Mexico timezones wrong offsets #1432
Replies: 1 comment 2 replies
-
What do you mean by:
If the "dates are saved in the database in UTC", what does it mean when the "backend shows you an offset"? Like is it fetching from the database but then sending you an ISO string, or...? In general, if you store a timestamp with an offset (like On the backend, a timestamp is a timestamp regardless of which zone it originated in. But on the frontend, an offset isn't enough to figure out the original timezone (because multiple time zones can share the same offset, but each time zone would have its own daylight savings rules or not, which can change over time). But if you store the timestamp+offset (or milliseconds) and also have the correct zone, the frontend can display that correctly. Does that help at all, or am I way off the mark...? |
Beta Was this translation helpful? Give feedback.
-
I have an application that uses time zones, the dates are saved in the database in UTC, when I display them on the client (a react application) they display correctly, in the case of the IANA America/Mexico_City zone, on the client It shows me an offset of -06:00 which is correct, but in the backend that same time zone shows me an offset of -05:00.
Does anyone have an idea?
Beta Was this translation helpful? Give feedback.
All reactions