I have a problem with my uk based website. Football fixtures need to turn into results after the date and time set in the database. Because the Winhost servers are US based the timezomes are incorrect. I tried globally setting the time zone in the web.config file as <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-GB" /> But this doesn't seen to make any difference. Is there any way to achieve this? Thanks
globalization doesn't really do anything to the timezone. Globalization mainly deals w/ how dates, characters, money, etc are presented. there are many resources on the internet regarding timezone issues w/ application - http://geekswithblogs.net/mtreadwell/archive/2004/05/21/5214.aspx - http://stackoverflow.com/questions/832986/how-to-work-with-timezone-in-asp-net - http://weblogs.asp.net/cprieto/archive/2010/01/03/handling-timezone-information-in-asp-net.aspx
You should store dates in the UTC time zone in your database. Upon retrieving dates you should convert these UTC dates to the TimeZone you want. The Following Code creates a method that can convert From UTC TimeZone to W. Europe Standard Time.