cecsno said:Something like this will work.
DEFINE VARIABLE server-time AS INTEGER LABEL "Server Time" NO-UNDO.
DEFINE VARIABLE client-time AS INTEGER LABEL "Client Time" NO-UNDO.
DEFINE VARIABLE time-diff AS INTEGER NO-UNDO.
SESSION:TIME-SOURCE = "local".
client-time = TIME .
SESSION:TIME-SOURCE = "qaddb".
server-time = TIME.
time-diff = client-time - server-time.
DISPLAY
STRING(TIME + time-diff,"HH:MM:SS") LABEL "Client Time"
STRING(time,"hh:mm:ss") LABEL "Server Time"
WITH 1 COLUMN FRAME a.
define Variable dzTimeNow as dateTime-TZ no-undo initial ?.
define varaible iTimeZone as integer no-undo initial 0
/* Time off your server. */
dzTimeNow = now.
/* 720 minutes equates to +12:00 GMT/UTC */
iTimeZone = 720.
/* Converts the server date time into the required time zone.*/
dzTimeNow = datetime-TZ(dzTimeNow, iTimeZone).