You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected #37657
@mallenexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
changed the title [-]Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected[/-][+][$500] Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected[/+]on Mar 4, 2024
changed the title [-][$500] Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected[/-][+][$250] Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected[/+]on Mar 4, 2024
Please re-state the problem that we are trying to solve in this issue.
The time displayed in the chat page for Asia/Almaty is incorrect. It's off by 1 hour.
What is the root cause of that problem?
Kazakhstan has decided to unify the entire country under 1 timezone. This is a new change on March 1, 2024.
What changes do you think we should make in order to solve the problem?
User needs to update their browser (after manufacturer updates time zone definitions). I suspect the IANA time zone definitions are browser level but further investigation is needed.
What alternative solutions did you explore? (Optional)
I think that should be fixed from the browser engine itself
the date-fns-tz library uses Intl.DateTimeFormat to get the timezone offset as you can notice here it still returns +6
an alternative would be either to temporally delete the Asia/Almaty timezone here since Kazakhstan unified the timezone at the beginning of the month OR we add a special handling for the Almaty timezone where if selected the timezone +5 should be passed to the utcToZonedTimehere
As @abzokhattab pointed out the date-fns-tz library uses Intl.DateTimeFormat to get the timezone, which seems to get its data from https://www.iana.org/time-zones which hasn't been updated since Kazakhstan unified it's timezone.
I think we can just leave this one and it should be fixed upstream as updates roll out.
Please re-state the problem that we are trying to solve in this issue.
Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected
What is the root cause of that problem?
The time displayed in the chat page for Asia/Almaty is incorrect. It's off by 1 hour as Kazakhstan has decided to unify the entire country under 1 timezone. This is a new change on March 1, 2024.
This will not be fixed upstream as we use @formatjs/intl-datetimeformat for polifilling Intl.DateTimeFormat on web and ios platform.
New tzdata was included in formatjs/formatjs@5a478ff, which includes the new timezone for Asia/Almaty.
What changes do you think we should make in order to solve the problem?
Update the package @formatjs/intl-datetimeformat to v6.12.3.
What alternative solutions did you explore? (Optional)
Activity
melvin-bot commentedon Mar 2, 2024
Triggered auto assignment to @mallenexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.lanitochka17 commentedon Mar 2, 2024
We think that this bug might be related to #vip-vsp
CC @quinthar
lanitochka17 commentedon Mar 2, 2024
@mallenexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
melvin-bot commentedon Mar 4, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01f6b6a2a8c5d7e88b
melvin-bot commentedon Mar 4, 2024
Triggered auto assignment to Contributor Plus for review of internal employee PR - @Ollyws (
Internal)mallenexpensify commentedon Mar 4, 2024
Unsure if we want to fix. @Ollyws if we do.. I'm assuming this would be a super-quick fix, do you agree?
Checking on in #vip-vsp
https://expensify.slack.com/archives/C066HJM2CAZ/p1709512189362859
[-]Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected[/-][+][$500] Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected[/+]3 remaining items
[-][$500] Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected[/-][+][$250] Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected[/+]melvin-bot commentedon Mar 4, 2024
Upwork job price has been updated to $250
mallenexpensify commentedon Mar 4, 2024
Marked external, put starting price at $250 cuz I have a hunch this should be a pretty quick fix.
Added to #vip-vsb
garatkarr commentedon Mar 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The time displayed in the chat page for Asia/Almaty is incorrect. It's off by 1 hour.
What is the root cause of that problem?
Kazakhstan has decided to unify the entire country under 1 timezone. This is a new change on March 1, 2024.
What changes do you think we should make in order to solve the problem?
User needs to update their browser (after manufacturer updates time zone definitions). I suspect the IANA time zone definitions are browser level but further investigation is needed.
What alternative solutions did you explore? (Optional)
abzokhattab commentedon Mar 5, 2024
I think that should be fixed from the browser engine itself
the
date-fns-tzlibrary usesIntl.DateTimeFormatto get the timezone offset as you can notice here it still returns+6an alternative would be either to temporally delete the
Asia/Almatytimezone here since Kazakhstan unified the timezone at the beginning of the month OR we add a special handling for theAlmatytimezone where if selected the timezone+5should be passed to theutcToZonedTimehereaskavyblr commentedon Mar 5, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The time displayed on the chat page for Asia/Almaty is incorrect.
What is the root cause of that problem?
The function getLocalDateFromDatetime does not return the time according to the specified time zone.
What changes do you think we should make in order to solve the problem?
need to change utcToZonedTime to zonedTimeToUtc , zonedTimeToUtc converts time from a specified time zone to UTC time.
App/src/libs/DateUtils.ts
Lines 119 to 122 in a8ece90
What alternative solutions did you explore? (Optional)
N/A
Fix5.mp4
Ollyws commentedon Mar 5, 2024
As @abzokhattab pointed out the date-fns-tz library uses Intl.DateTimeFormat to get the timezone, which seems to get its data from https://www.iana.org/time-zones which hasn't been updated since Kazakhstan unified it's timezone.
I think we can just leave this one and it should be fixed upstream as updates roll out.
mallenexpensify commentedon Mar 7, 2024
I agree, I'm going to close this. Thanks @abzokhattab @Ollyws and others for the feedback
shubham1206agra commentedon May 14, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Time - Incorrect time is displayed in the conversation when Timezone Asia/Almaty is selected
What is the root cause of that problem?
The time displayed in the chat page for Asia/Almaty is incorrect. It's off by 1 hour as Kazakhstan has decided to unify the entire country under 1 timezone. This is a new change on March 1, 2024.
This will not be fixed upstream as we use
@formatjs/intl-datetimeformatfor polifillingIntl.DateTimeFormaton web and ios platform.New tzdata was included in formatjs/formatjs@5a478ff, which includes the new timezone for
Asia/Almaty.What changes do you think we should make in order to solve the problem?
Update the package
@formatjs/intl-datetimeformattov6.12.3.What alternative solutions did you explore? (Optional)
NA