Kbase P99063: How to convert time and date from one time zone to another programmatically?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/20/2007 |
|
Status: Unverified
GOAL:
How to convert time and date from one time zone to another programmatically?
GOAL:
Sample program to change time and date from one time zone to another time zone
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)
FIX:
Assume a variable d1 with a value whose time zone you wish to change
d2 = datetime-tz (d1, <new tz offset>)
Where <new tz offset> is the timezone offset from UTC in minutes.
For example:
def var d1 as datetime-tz.
def var d2 as datetime-tz.
d1 = now.
display d1.
d2 = datetime-tz(d1, -60).
display d1 d2.
d2 will be displayed with the timezone as -01:00