Announcement

Collapse
No announcement yet.

[OPEN] [#3773] DateTime.ToLocalTime() not functioning as expected

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [OPEN] [#3773] DateTime.ToLocalTime() not functioning as expected

    https://deck.net/64949ac0da1507bf361e6c351dbbee01
    1. Setup a DateTime object to be UTC time at 1hour and15 minutes before the daylight savings time change (for pacific time zone)
    2. Advance the DateTime object by 15 minutes, convert to local time and display both utc, local, and timezone offset
    3. Expected output is generated in a .net cosole application:
    utc: 2018 11 04 07:45:00 AM +00:00 local: 2018 11 04 12:45:00 AM -07:00
    utc: 2018 11 04 08:00:00 AM +00:00 local: 2018 11 04 01:00:00 AM -07:00
    utc: 2018 11 04 08:15:00 AM +00:00 local: 2018 11 04 01:15:00 AM -07:00
    utc: 2018 11 04 08:30:00 AM +00:00 local: 2018 11 04 01:30:00 AM -07:00
    utc: 2018 11 04 08:45:00 AM +00:00 local: 2018 11 04 01:45:00 AM -07:00
    utc: 2018 11 04 09:00:00 AM +00:00 local: 2018 11 04 01:00:00 AM -08:00    <<-- This is the behavior I expect: fall back to 1am and utc offset changes
    utc: 2018 11 04 09:15:00 AM +00:00 local: 2018 11 04 01:15:00 AM -08:00
    utc: 2018 11 04 09:30:00 AM +00:00 local: 2018 11 04 01:30:00 AM -08:00
    utc: 2018 11 04 09:45:00 AM +00:00 local: 2018 11 04 01:45:00 AM -08:00
    utc: 2018 11 04 10:00:00 AM +00:00 local: 2018 11 04 02:00:00 AM -08:00    
    utc: 2018 11 04 10:15:00 AM +00:00 local: 2018 11 04 02:15:00 AM -08:00
    utc: 2018 11 04 10:30:00 AM +00:00 local: 2018 11 04 02:30:00 AM -08:00
    utc: 2018 11 04 10:45:00 AM +00:00 local: 2018 11 04 02:45:00 AM -08:00
    utc: 2018 11 04 11:00:00 AM +00:00 local: 2018 11 04 03:00:00 AM -08:00
    utc: 2018 11 04 11:15:00 AM +00:00 local: 2018 11 04 03:15:00 AM -08:00
    utc: 2018 11 04 11:30:00 AM +00:00 local: 2018 11 04 03:30:00 AM -08:00
    utc: 2018 11 04 11:45:00 AM +00:00 local: 2018 11 04 03:45:00 AM -08:00
    utc: 2018 11 04 12:00:00 PM +00:00 local: 2018 11 04 04:00:00 AM -08:00
    utc: 2018 11 04 12:15:00 PM +00:00 local: 2018 11 04 04:15:00 AM -08:00
    utc: 2018 11 04 12:30:00 PM +00:00 local: 2018 11 04 04:30:00 AM -08:00
    Unexpected output is generated in a bridge.net app
    utc: 2018 11 04 7:45:00 AM Z local: 2018 11 04 12:45:00 AM -07:00
    utc: 2018 11 04 8:00:00 AM Z local: 2018 11 04 1:00:00 AM -07:00
    utc: 2018 11 04 8:15:00 AM Z local: 2018 11 04 1:15:00 AM -07:00
    utc: 2018 11 04 8:30:00 AM Z local: 2018 11 04 1:30:00 AM -07:00
    utc: 2018 11 04 8:45:00 AM Z local: 2018 11 04 1:45:00 AM -07:00
    utc: 2018 11 04 9:00:00 AM Z local: 2018 11 04 1:00:00 AM -07:00   <<-- going back to 1am is expected but the utc offset should also change to -08:00
    utc: 2018 11 04 9:15:00 AM Z local: 2018 11 04 1:15:00 AM -07:00
    utc: 2018 11 04 9:30:00 AM Z local: 2018 11 04 1:30:00 AM -07:00
    utc: 2018 11 04 9:45:00 AM Z local: 2018 11 04 1:45:00 AM -07:00
    utc: 2018 11 04 10:00:00 AM Z local: 2018 11 04 1:00:00 AM -08:00    <<-- here we fall back to 1am again! not expected.
    utc: 2018 11 04 10:15:00 AM Z local: 2018 11 04 1:15:00 AM -08:00
    utc: 2018 11 04 10:30:00 AM Z local: 2018 11 04 1:30:00 AM -08:00
    utc: 2018 11 04 10:45:00 AM Z local: 2018 11 04 1:45:00 AM -08:00
    utc: 2018 11 04 11:00:00 AM Z local: 2018 11 04 2:00:00 AM -08:00
    utc: 2018 11 04 11:15:00 AM Z local: 2018 11 04 2:15:00 AM -08:00
    utc: 2018 11 04 11:30:00 AM Z local: 2018 11 04 2:30:00 AM -08:00
    utc: 2018 11 04 11:45:00 AM Z local: 2018 11 04 2:45:00 AM -08:00
    utc: 2018 11 04 12:00:00 PM Z local: 2018 11 04 3:00:00 AM -08:00
    utc: 2018 11 04 12:15:00 PM Z local: 2018 11 04 3:15:00 AM -08:00
    utc: 2018 11 04 12:30:00 PM Z local: 2018 11 04 3:30:00 AM -08:00
    Last edited by selinc; Yesterday @ 06:07 PM. Reason: adding tags

    #2
    Bump --
    Haven't heard a response for a few days. Is there any status on this?

    Comment


      #3
      Hello @selinc!

      Thanks for reporting the issue. Unfortunately, we don't have a solution for this without more investigation. We've logged it under #3773 in github and will post an update here as soon as we get it fixed!

      Comment

      Working...
      X