TimeZoneInfo.ConvertTime from PST to UTC to AEST - off by one hour

前端 未结 1 399
失恋的感觉
失恋的感觉 2021-01-23 23:13

I convert a string that represents a time in Pacific Time Zone that I am using to create a DateTime object:

var pacificDateTime = new DateTime(2016,         


        
相关标签:
1条回答
  • 2021-01-23 23:45

    From Wikipedia's Time in Australia article:

    Australia has two eastern time zones. In the northeast, UTC+10 applies all year. In the southeast, UTC+10 applies during standard time, and UTC+11 applies during daylight time (aka summer time).

    The northeast region (Queensland) uses the IANA time zone identifier "Australia/Brisbane", while the southeast region (New South Wales) uses "Australia/Sydney". These correspond to the Windows time zone identifiers: "E. Australia Standard Time" and "AUS Eastern Standard Time" respectively.

    • If you are converting for Queensland, use "E. Australia Standard Time".

    • If you are converting for New South Wales, use "AUS Eastern Standard Time".

    As to the confusing nature of these identifiers, see the section about Windows time zones in the timezone tag wiki.

    If you want to use the standard IANA identifiers instead, use Noda Time.

    0 讨论(0)
提交回复
热议问题