Hi
Does anybody have an elegant way to calculate the local date time from an UTC specified date time.
Example:
Input: 2008-05-20T10:00:00Z
Output:2008-05-20T12:00
The emphasis is on the word "elegant".
I know it is easy if you know the start date and the end date of the daylight saving and if you know the timezone you are in. But this information must be either be setup in navision or read from elsewhere, for example the windows registry.
The opposite is quite easy, using the Format statement with parameter "9"
http://www.mibuso.com/forum/viewtopic.php?t=25228
Any ideas will be appreciated. Thanks.
Thomas
[edit]
Btw, this looks strange to me:My computer is set to GMT+1 (Amsterdam, Berlin, Rome,etc)
myDateTime := CREATEDATETIME(010108d,10t)
Format(myDatetime,0,9) ==> 2008-01-01T08:00:00Z
myDateTime := CREATEDATETIME(010508d,10t)
Format(myDatetime,0,9) ==> 2008-05-05T08:00:00Z
Actually I expected in the first date (january) the time part would be 09:00 ](*,)