I have different timezones and their GMT and DST. Example:
TimeZoneId | GMT offset | DST offset
private static ReadOnlyCollection _timeZones = TimeZoneInfo.GetSystemTimeZones();
public static DateTime ToUsersTime(this DateTime utcDate, int timeZoneId)
{
return TimeZoneInfo.ConvertTimeFromUtc(utcDate, timeZones[timeZoneId]);
}
An example of converting a UTC date to a user's date using the TimeZoneInfo class (.NET 3.5+).