Hi Freaks
Just a simple question 🙂
How to get the correct time from another timezone, if the day is not today?
Example:
I do have two timestamps, both created in germany
1) 2020101T180000 (1 january of 2020, 6 PM CET)
1) 2020501T180000 (1 may of 2020 , 6 PM CEST)
Now I want to convert them to UTC
The correct values would be:
1) 2020101T170000Z (1 january of 2020, 5 PM UTC)
1) 2020501T160000Z (1 may of 2020 , 4 PM UTC)
Problem is, that the difference is not a constant, but depends on "daylight saving"
With $nlstimezone set to UTC, I got only $datim as the currenct time in UTC
$nlstimezone
*Returned by the Proc functions $clock, $date, and $datim
*Displayed in fields with data types date, time, or combined date and time
*Stored and retrieved in the database
*Exchanged when using XML, call-in, or call-out
This does not include formating of datetime into a string, so
v_TIMESTAMP = "020101180000"
$nlstimezone="UTC"
$1 = "%%v_TIMESTAMP%%%"
does not give the correct value (as it doesn't convert at all)
As I want to convert a timestamp to the correct "Zulu" time with global procedures, I can't use field or database access
Any idea how to simple convert a timestamp to the correct time in another timezone?
Regards Ingo




