Hi i have created the asp.net web application without considering the time zone. I am using directly the DateTime.Now function. Actually that returns datetime in server configured time zone format. Now i cant change entire application. so is there any way set the TimeZone of application independent of server in which it is hosted? or is there any way to set in web config file.
TimeZone.CurrentTimeZone
is used for the time zone on the computer where the code is executing.
Check these links: http://msdn.microsoft.com/en-us/library/system.timezone.currenttimezone.aspx
http://msdn.microsoft.com/en-us/library/system.timezoneinfo.local.aspx
If 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