TimeZoneInfo.Local returns the current local time zone
using System;
using System.Text;
using System.Globalization;
class Sample
{
public static void Main()
{
TimeZoneInfo zone = TimeZoneInfo.Local;
Console.WriteLine(zone.StandardName);
Console.WriteLine(zone.DaylightName);
}
}
The output:
Pacific Standard Time
Pacific Daylight Time
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |