InterSystems FAQ rubric
$ZTIMESTAMP returns the date and time in UTC format, so to change it to the local time zone, use the following system method:
$SYSTEM.Util.UTCtoLocalWithZTIMEZONE($ZTIMESTAMP)
The above output will be in the format ddddd,sssss.fff.
ddddd: Same format as $HOROLOG dates
sssss: An integer indicating the number of seconds elapsed since midnight on the current date
fff: Variable number of digits indicating the fractional part of a second
* Similar to $HOROLOG, except that $HOROLOG does not include fractional seconds.
SAMPLES>write $SYSTEM.Util.UTCtoLocalWithZTIMEZONE($ZTIMESTAMP)," - ", $horolog,!
63895,64252.66 - 63895,64252
SAMPLES>write $ZDATETIME($SYSTEM.Util.UTCtoLocalWithZTIMEZONE($ZTIMESTAMP),8)
20151209 17:45:56
SAMPLES>write $ZDATETIME($ZTIMESTAMP,8)
20151209 08:46:05
SAMPLES>