Forum Post: Inconsistency Assigning Datetime-tz To Datetime

  • Thread starter Thread starter dbeavon
  • Start date Start date
Status
Not open for further replies.
D

dbeavon

Guest
I did a bit of homework looking for an explanation of the behavior I get when assigning a datetime-tz to a datetime. Here is a link of more confusion in a similar vein. https://community.progress.com/community_groups/openedge_development/f/19/t/9423 Can someone please run this and tell me if the output line marked with "1" is different from the others for you? For me it is different (OE 11.3). Based on the ABL reference, I think all output lines should show the current time in UTC. (session timezone). /* HERE GOES NOTHING */ SESSION:TIMEZONE = 0. DEFINE VARIABLE vDate1 AS DATETIME. DEFINE VARIABLE vDate2 AS DATETIME. DEFINE VARIABLE vDate3 AS DATETIME. DEFINE VARIABLE vdateTZ AS DATETIME-TZ. vDateTZ = datetime-tz(NOW,0). vDate1 = vDateTZ. vDate2 = NOW. vDate3 = DATETIME(DATE(vDateTZ), MTIME(vDateTZ)). MESSAGE "SESSION NOW" NOW SKIP "SPECIFIED TZ" vDateTZ SKIP "1" vDate1 SKIP "2" vDate2 SKIP "3" vDate3 VIEW-AS ALERT-BOX. ┌────────────────── Message ───────────────────┐ │ SESSION NOW 12/03/2015 20:40:00.715+00:00 │ │ SPECIFIED TZ 12/03/2015 20:40:00.715+00:00 │ │ 1 12/03/2015 15:40:00.715 │ │ └──────────────────────────────────────────────┘ I am probably going to work on this with Progress tech support for a while but I wondered why I'm the only one having trouble (can't turn anything up from googl'ing). Thanks, David

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