infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Tcl Library
Time Zone Conversion
System
Originally posted by Don Anderson
HAs anyone done Time Zone Conversions?
I need to convert the time for all time zones for the US
Thanks in advance
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Don Anderson
set date $xlateInVals
set dt [clock format [clock scan [exec $date]] -format %Y%m%d%H%M]
set xlateOutVals $dt
args: should be "clock format clockval ?-format string? ?-gmt boolean?"
#####################################################################
##
# XLT call action (code fragment) DISCH Time Zone Conversion
#
# danderson 2/3/09
#
lassign $xlateInVals facility ts
echo $ts
if {$ts == ""} {
set xlateOutVals ""
} else {
set yyyy [csubstr $ts 0 4]
set MM [csubstr $ts 4 2]
set dd [csubstr $ts 6 2]
set hh [csubstr $ts 8 2]
set mm [csubstr $ts 10 2]
set ss [csubstr $ts 12 2]
set admit "$MM/$dd/$yyyy $hh:$mm:$ss"
switch -exact -- $facility {
BOSTON {set tz 0}
CANADA {set tz 0}
CINCINNATI {set tz 0}
ERIE {set tz 0}
GREENVILLE {set tz 0}
LEXINGTON {set tz 0}
PHILADELPHIA {set tz 0}
SPRINGFIELD {set tz 0}
TAMPA {set tz 0}
CHICAGO {set tz 1}
GALVESTON {set tz 1}
HOUSTON {set tz 1}
MEXICO {set tz 1}
SHREVEPORT {set tz 1}
STLOUIS {set tz 1}
TWINCITES {set tz 1}
INTERMOUNTAIN {set tz 2}
LOSANGELES {set tz 3}
NCALIFORNIA {set tz 3}
PORTLAND {set tz 3}
SPOKANE {set tz 3}
HONOLULU {set tz 5}
}
set epoch [convertclock $admit]
set adj_epoch [expr $epoch - {$tz * 3600}]
set new_admit [clock format $adj_epoch -format %Y%m%d%H%M%S]
set xlateOutVals $new_admit
}