I'm using a server where it's time is GMT-8.
Im using DateTime so how do i convert it to GMT+0 taking into consideration British summer time as im based inthe UK.
Thanks for your time.
Paul.
I'm using a server where it's time is GMT-8.
Im using DateTime so how do i convert it to GMT+0 taking into consideration British summer time as im based inthe UK.
Thanks for your time.
Paul.
GMT-8 to GMT+0 (UK) with consideration for british summer time?
Whoisit
Vinodonly
Joshizzle
Another killer nobugz post -- marked as helpful! UTC time is always a good starting point.
vdv_phuong
Take a look at the TimeZone class:
DateTime localTime = TimeZone.CurrentTimeZone.ToLocalTime(datetime);
Otherwise I believe it will be to do with the culture area. I think you may need to also implement the IFormatProvider at some stage to give the local culture/take it into consideration using the DateTime.TryParse() method
I could be wrong however, only just spotted the class and looking through the docs!
progames25
rc_onecall
SOTY_Programmer
Anthony Moore and Kathy Kam have been publicly pontificating the evolution of DateTime as it applies to conversion between locales (see Designing "Time Zone Conversions").
But Dan Rogers has a good article Coding Best Practices Using DateTime in the .NET Framework. It was written before .NET 2.0 came out. .NET 2.0 doesn't have anything "inherent" to deal with timezone conversions. The best advice is to only use UTC in your implementation and "convert" to a local time (including timezone) when displaying the date/time. The above article as a section on "Daylight Savings Time", which is North America's term for when clocks should move forward and backward in different times of the year (I'm assuming "Summer Time" is similar).
kasumi241026
CemSharp
Muricy