Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dayling Saving Time and GMT offset
Message
From
29/03/2012 20:18:18
 
 
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:
01539746
Views:
29
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform