CSharp examples for System:DateTime Timezone
Get Utc Time Assuming Zone
using System.Globalization; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from www .j av a 2 s .c o m*/ public class Main{ public static DateTime GetUtcTimeAssumingZone(this DateTime date, string timeZoneID) { return TimeZoneInfo.ConvertTimeToUtc(date, TimeZoneInfo.FindSystemTimeZoneById(timeZoneID)); } }