One of the new classes in .NET 3.5 is TimeZoneInfo. MSDN's vague and all-encompassing description states "Represents any time zone in the world." Scrolling further down, you'll find a list of actual things that TimeZoneInfo can do:
- Retrieving a time zone that is already defined by the operating system.
- Enumerating the time zones that are available on a system.
- Converting times between different time zones.
- Creating a new time zone that is not already defined by the operating system.
- Serializing a time zone for later retrieval.
Personally, I'm using TimeZoneInfo for all of my DateTime conversions to support different time zones. Performing the conversion is as easy as calling ConvertTimeBySystemTimeZoneId. Here are a few examples:
DateTime pstDateTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(utcDateTime, TimeZoneInfo.Utc.Id, "Pacific Standard Time");
DateTime utcDateTime = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(pstDateTime, "Pacific Standard Time", TimeZoneInfo.Utc.Id);
TimeZoneInfo supports daylight savings time (DST), and makes supporting time zones much easier than rolling your own solution.