Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dayling Saving Time and GMT offset
Message
From
30/03/2012 10:08:40
 
 
To
30/03/2012 09:59:53
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01539622
Message ID:
01539797
Views:
21
>>:-} Saved me replying. Actually this is safest:
Dim offsetMinutes As Double = New DateTimeOffset(DateTime.Now).Offset.TotalMinutes
but from a practical POV a few ticks won't make much difference.....
>
>Thanks
>
>In order to avoid that precision, as I only need -120, 240, 0, 60, -60, etc., I do this:
>
>
>            ' Offset number of minutes from GMT for the server
>            oApp.nTimeZoneServerOffsetMinuteFromGMT = Math.Abs(New DateTimeOffset(DateTime.Now).Offset.TotalMinutes)
>
That won't give you negative values. Using it as I posted should give you the result you are looking for...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform