[Progress Communities] [Progress OpenEdge ABL] Forum Post: DATETIME-TZ function handling DST

Status
Not open for further replies.
A

Akshay Guleria

Guest
It seems that that the DATETIME-TZ function can figure out the DST timezone if SESSION:TIMEZONE is not set i.e. ?. OS timezone is a DST timezone. I’m using ‘Europe/Berlin’ for testing. Now using the below example code we can see that the DATETIME-TZ function figures out the correct timezone of each date, accurate to their DST timezone. def var ldtWinterTS as datetime-tz. def var ldtSummerTS as datetime-tz. ldtWinterTS = DATETIME-TZ(02, 24, 2019, 0, 0, 0). ldtSummerTS = DATETIME-TZ(06, 19, 2019, 0, 0, 0). DISP ldtWinterTS LABEL "Winter TS" SKIP ldtSummerTS LABEL "Summer TS" SKIP WITH SIDE-LABEL. RESULT: Winter TS: 24/02/2019 00:00:00.000+01:00 Summer TS: 19/06/2019 00:00:00.000+02:00 I would like to know how exactly the DATETIME-TZ function figures out the DST timezones? Any pointer to implementation/code would be nice to have. can this feature be reused somehow in OE application/implementations?

Continue reading...
 
Status
Not open for further replies.
Top