Skip to content

Date time format fix#7195

Closed
estrattonbailey wants to merge 2 commits into
mainfrom
date-time-format-fix
Closed

Date time format fix#7195
estrattonbailey wants to merge 2 commits into
mainfrom
date-time-format-fix

Conversation

@estrattonbailey
Copy link
Copy Markdown
Member

@estrattonbailey estrattonbailey commented Dec 19, 2024

DMs were showing as being sent at UTC instead of the user's local time zone on iOS and Android. This seems to have been introduced in #6742.

This new polyfill should allow us to specify a default timezone on app load, but this does not appear to work on iOS or Android. See first commit for that attempt.

In the second commit, I applied the "fix", which is to use the built-in Intl.DateTimeFormat instead of the polyfill. I have not yet confirmed if this regresses #6742.

@arcalinea arcalinea temporarily deployed to date-time-format-fix - social-app PR #7195 December 19, 2024 21:40 — with Render Destroyed
@github-actions
Copy link
Copy Markdown
Contributor

Old size New size Diff
6.84 MB 6.84 MB 0 B (0.00%)

@gaearon
Copy link
Copy Markdown
Contributor

gaearon commented Dec 19, 2024

did this in #7196

@gaearon gaearon closed this Dec 19, 2024
@surfdude29
Copy link
Copy Markdown
Contributor

@auroursa auroursa mentioned this pull request Dec 20, 2024
@auroursa
Copy link
Copy Markdown
Contributor

I faced a timezone issue while exploring #6742. This was my solution at the time (I hope this helps). Since no longer relied on datetimeformat to output time, I thought it was no longer an issue and removed it. I sincerely apologize for the consequences of not testing it thoroughly.

@auroursa
Copy link
Copy Markdown
Contributor

Upon rechecking the first commit, it seems that it was just missing import '@formatjs/intl-datetimeformat/add-all-tz.js', adding it will make it work properly.
image

@auroursa
Copy link
Copy Markdown
Contributor

According to the first commit, the missing import has been added. Please see #7204.

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.

5 participants