I am trying to get the local time on the server based on a DateTime from the database like:
TimeZone := TimeZone.CurrentTimeZone;
LocalTime := TimeZone.ToLocalTime(in_DT);
Name DataType Subtype Length
TimeZone DotNet 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.TimeZone
in_DT is the DateTime I want to convert, and LocalTime is the resulting DateTime.
The returned LocalTime is exactly the same as in_DT...
Somebody have an idea what is wrong?
0
Comments
When I log into the server in question, I am seeing the right time - so I guess it may be a question of the root policy in the domain... Or?
On a related note; for some reason the version of the mscorlib states 2.0.0.0? And sure enough there is 3.5 functionality missing (like TimeZoneInfo). Is there some way to use a higher version of mscorlib?
I still would like to know why I can only select the 2.0.0.0 version of mscorlib though... If anybody happens to know?
Time zones usage in Microsoft Dynamics NAV web services
http://blogs.msdn.com/b/nav/archive/201 ... vices.aspx
http://www.BiloBeauty.com
http://www.autismspeaks.org