Skip to content

Set time zone to the user's local time zone when using date formatters #1176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 16, 2024

Otherwise, the date formatters always output the time in UTC, which has confused me multiple times. Setting the user’s local time zone will emit the date in the user’s local time zone and include the time zone offset to GMT in the date as well.

Otherwise, the date formatters always output the time in GMT, which has confused me multiple times. Setting the user’s local time zone will emit the date in the user’s local time zone and include the time zone offset to GMT in the date as well.
@ahoppen ahoppen requested a review from bnbarham April 16, 2024 05:28
@ahoppen ahoppen requested a review from benlangmuir as a code owner April 16, 2024 05:28
@ahoppen
Copy link
Member Author

ahoppen commented Apr 16, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 16, 2024

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 94cce3c into swiftlang:main Apr 23, 2024
3 checks passed
@ahoppen ahoppen deleted the ahoppen/time-zone branch April 23, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants