CSharp examples for System:DateTime Timezone
Get For Time Zone
using System.Security.Cryptography; using System.Text; using System;/* www . j av a 2 s . co m*/ public class Main{ public static DateTimeOffset GetForTimeZone(string date, string time, string timeZoneId) { var tz = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId); DateTime dt = DateTime.Parse(string.Format("{0} {1}", date, time)); return new DateTimeOffset(dt, tz.GetUtcOffset(dt)); } }