2014-03-19 47 views
-2

我开发了一个时钟,它显示了IST & EST时间。我来自印度,所以我的系统时钟设置使用IST设置。我想在时钟中显示EST日光时间。我如何显示EST的夏时制时间?如何检测EST时间的夏令时?

回答

0

可以使用FindSystemTimeZoneById方法是这样的:

Dim istNow = System.TimeZoneInfo.ConvertTime(Now, TimeZoneInfo.FindSystemTimeZoneById("India Standard Time")) 
    Dim estNow = System.TimeZoneInfo.ConvertTime(Now, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")) 
    Debug.WriteLine(istNow.ToString) 
    Debug.WriteLine(estNow.ToString)