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

Status
Not open for further replies.
D

dbeavon

Guest
I'm curious about the precise use-case. You simply said: ".. . resolve a lot of datetime-tz related issue where DST needs to be considered for UI displays ... ". Are you saying that you want to be able to visually indicate to the user whether the related point of time was daylight savings or not? This is a bit confusing to me. Normally it is up to the user to pick their "preference" of timezone, usually in the hosting OS. Once they've selected it, the user should know for themselves what the rules are for their own timezone. For example, if I live in EST5EDT and I have a very short business trip to another timezone that is three hours away (eg. PST8PDT) then I might continue keeping displaying my times in EST5EDT if I desire ... it is my own choice ... nothing forces me to change the visual representations of my date/times (eg in my audit logs or whatever). I suspect that the best information you can get out of OE is the offset from UTC, as you are already aware (+01:00 or +02:00) RESULT : Winter TS: 24/02/2019 00:00:00.000+01:00 Summer TS: 19/06/2019 00:00:00.000+02:00 ... the problem is that timezone stuff works very differently from one OS to another. If you want to do better than displaying "+01:00" then you probably just shell out to the OS: (host:/home/me)date Thu Sep 5 09:03:32 EDT 2019 Personally I think it might be overkill, if your users already have a way to select their preference of timezone in the OS - assuming they understand how that selected timezone behaves.

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