D
dbeavon
Guest
Well, I put everything in UTC time to make the problem as obvious as possible. It is clear that the assignment in question (line "1") is either ignoring my SESSION:TIMEZONE, or is overly sensitive to whatever timezone data is gathered from the host . My assumption is that it is a bug. It is *supposed* to use the user's *session* information (the session's specified local timezone) to convert the DATETIME-TZ to a DATETIME. The additional vDate2 and vDate3 are not totally related to vDate1, but were interesting to look at. vDate2 is most similar. It also uses "NOW" (documented to return a DATETIME-TZ), but it immediately assigns to a regular DATETIME instead of using an intermediate DATETIME-TZ variable. The intermediate DATETIME-TZ is the only difference between the two scenarios ("1" and "2"). That intermediate variable should not have any impact on the final results, IMO. Finally I should note that vDate3 is actually intended/documented to work differently than the other examples. (Although it is a source of confusion from time to time). In this scenario the DATE() and MTIME() functions intentionally ignore the SESSION timezone if argument is a DATETIME-TZ. This is the only one of the three that is supposed to ignore the ABL session's local timezone.
Continue reading...
Continue reading...