Skip to content
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

timezones don't persist through changes #69

Open
kapil1garg opened this issue May 15, 2024 · 2 comments
Open

timezones don't persist through changes #69

kapil1garg opened this issue May 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kapil1garg
Copy link
Contributor

I set the timezone in UTC originally, but the front-end is generating timezones in America/Chicago. what's ultimately happening is that the timezone info is getting stripped out of the Dates as they are passed around, so the server misinterprets the timestamp as being in UTC time (which is 5/6 hours ahead) when it should be Chicago time

one way to fix this is to have EVERYTHING use only UTC, and include a timezone property as part of the CAPNotes. then, only when creating a formatting string, do you convert to timezones.

@kapil1garg kapil1garg added the bug Something isn't working label May 15, 2024
@kapil1garg
Copy link
Contributor Author

using something like date-fns with utc would make life easier: https://github.com/date-fns/utc?tab=readme-ov-file

good read: https://moment.github.io/luxon/#/zones?id=dst-weirdness

@kapil1garg
Copy link
Contributor Author

Gonna leave this open for now incase something was missed

@kapil1garg kapil1garg reopened this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant