Skip to content

[iOS/macOS] Time zone APIs don't reflect system time zone change #97010

Description

@tipa

Description

It appears that the app is "stuck" in the time zone that was set as system time zone at the time of app launch.
Later changes to the system time zone (in the macOS/iOS system settings) don't seem to affect the .NET APIs that depend on a time zone (e.g. DateTime.Now)

Reproduction Steps

  • Launch app
  • Switch to other time zone in (iOS/macOS) system settings
  • call DateTime.Now or TimeZoneInfo.Local

Expected behavior

Correct time and time zone (according to the current time zone set in the system settings)

Actual behavior

Wrong time and time zone. The app is "stuck" in the old time zone that was set in the system at the time the app launched

Regression?

No response

Known Workarounds

No response

Configuration

.NET8, iOS 17.2.1, macOS 14.2.1

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions