$ZTIMESTAMP in local time
How do you get a $ZTIMESTAMP in local time?.
I have found this solution and it works:
Set LocalTimestamp=$ZDATETIMEH($ZTIMESTAMP,-3)
Do you use any better way?
Discussion (5)1
Comments
Set LocalTimestamp=$now()Just note that $NOW() doesn't adjust for Daylight Saving Time.
Thanks Alexey for your answer but as Jhon says $now doesn't adjunt for Dailyght Save Time and I need it. ![]()
Note:The preferred way to convert UTC time to local time is to use the $ZDATETIMEH(utc,-3) function. This function adjusts for local time variants.proof
Also see ##class(%UTC).NowLocal()
Thanks Vitaly