【问题标题】:How to detect Daylight saving of EST timing?如何检测 EST 时间的夏令时?
【发布时间】:2014-04-25 14:39:47
【问题描述】:

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

【问题讨论】:

    标签: .net vb.net timezone


    【解决方案1】:

    您可以像这样使用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)
    

    【讨论】:

      猜你喜欢
      • 2015-08-04
      • 2011-09-03
      • 1970-01-01
      • 2016-06-18
      • 2019-11-20
      • 2020-05-22
      • 2014-08-11
      • 2013-11-22
      相关资源
      最近更新 更多