Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dayling Saving Time and GMT offset
Message
De
30/03/2012 10:08:40
 
 
À
30/03/2012 09:59:53
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01539622
Message ID:
01539797
Vues:
22
>>:-} 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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform