How can I set Universal timezone for entire application.
So that even if the timezone is changed, the application should show time as per universal timezone.
So is it possible to set entire application timezone?
To display all time zones in our current system, we use TimeZoneInfo. GetSystemTimeZone() static method that returns all available time zones on a machine. The DisplayName property is the name of the time zone.
Unfortunately you cannot (You could look at Jon Skeet response in following thread: Setting/Changing an .NET application's TimeZone). So you have two options:
DateTime.ToUniversalTime
(MSDN description)DateTime
and use it insteadIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With