public static class DateTimeExtensions { /// <summary> /// Returns a DateTimeOffset object of a specified date in a specified time zone /// </summary> /// <param name="dt">The date</param> /// <param name="timeZoneName">The name of the time zone. MUST be one of the /// [Id] values from the TimeZoneInfo.GetSystemTimeZones() method call.</param> /// <returns></returns> public static DateTimeOffset SpecifyTimeZone(this DateTime dt, string timeZoneName) { var tzi = TimeZoneInfo.FindSystemTimeZoneById(timeZoneName); return new DateTimeOffset(dt, tzi.GetUtcOffset(dt)); } }