CSharp examples for System:DateTime Timezone
Get Current Time Zone
using System;//from w w w . ja v a 2s . c o m public class Main{ public static int GetCurrentTimeZone() { DateTime now = DateTime.Now; DateTime time2 = now.ToUniversalTime(); TimeSpan span = new TimeSpan(now.Ticks - time2.Ticks); return span.Hours; } }