Conversation
joshhwuu
approved these changes
Mar 15, 2026
Woe4
approved these changes
Mar 15, 2026
bjzsh
requested changes
Mar 15, 2026
Member
bjzsh
left a comment
There was a problem hiding this comment.
If I remember right, our current schema is using timestamp and date in various places. Neither of these are timezone-friendly. Can we include a migration to convert all of our date/time fields to timestamptz?
| return false, err | ||
| } | ||
|
|
||
| // Get start of day for both dates for proper date-only comparison |
Member
There was a problem hiding this comment.
I think it makes more sense to compare the timestamps directly (i.e. including hours/minutes/seconds). If we want to be precise, we can ensure that the value we write is at 00:00 UTC-7 instead: But we are already writing 00:00 UTC+0, which is fine.
Contributor
Author
There was a problem hiding this comment.
Yeah I can include the migration, makes sense to me.
bjzsh
approved these changes
Mar 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#27
This PR gets rid of all of our pacific time conversions and stores time as UTC in the database.
Side note: this was actually causing a bug in our frontend because we would convert the time to pacific and store it in the database but we would never specific the location in postgres so it just serialized it as UTC. When we would then fetch the data from the frontend, it would return the pacific time but in UTC (in the future I guess) and then our frontend which has its time set to pacific would then turn this UTC time into pacific (in the past).