Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dayling Saving Time and GMT offset
Message
De
29/03/2012 20:18:18
 
 
À
29/03/2012 14:34:18
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:
01539746
Vues:
30
>Sure. Depending on what you are trying to achieve these might be useful:
Dim dt2 As DateTime = DateTime.Now
>Dim utcTime As DateTime = TimeZoneInfo.ConvertTimeToUtc(dt2)
>
>Dim dt3 As DateTime = DateTime.UtcNow
>Dim easternTime As DateTime = TimeZoneInfo.ConvertTimeFromUtc(dt3, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"))
And another (new in 4.0 or maybe 3.5):
Dim dto As New DateTimeOffset(DateTime.Now)
>Dim offset = dto.Offset
>Dim utcTime = dto.UtcDateTime
>Dim localTime = dto.LocalDateTime
Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform