[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Timezone logic in OE ABL

  • Thread starter Thread starter gus bjorklund
  • Start date Start date
Status
Not open for further replies.
G

gus bjorklund

Guest
Values of variables and database fields of type datetime-tz are stored as GMT, with a timezone offset in minutes initially set to the "originating timezone". database indexing, arithmetic, and comparisons are all done in GMT independent of the timezone value. you can determine the timezone setting of a datetime-tz value by using the timezone function, as follows: tzoffset = timezone (dtx expression). you can change the stored timezone of a datetime-tz variable or field by using the datetime-tz function, as follows: dtzvariable = datetime (dtzvariable, newtzoffset). the SESSION:DISPLAY-TIMEZONE attribute is used when converting a datetime-tz value to display format. if the SESSION:DISPLAY-TIMEZONE has not been set, then the SESSION:TIMEZONE is used instead. you can change the SESSION:DISPLAY-TIMEZONE to be whatever you want to be used when displaying datetime=tz values. The setting has no effect on the stored values, only on display formatting. the SESSION:TIMEZONE attribute is used as the "originating timezone" when assigning values to datetime-tz variables. When sessions in different timezones assign values to database fields, they can be compared directly and give the correct result as long as each session's SESSION:TIMEZONE is set correctly. You can think of the timezone part of a datetime-tz value as being mostly for display purposes.

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