Skip to content

Add UTC timezone to dates fetched from the database.#12

Merged
calavera merged 3 commits intomainfrom
optional_date_without_timezone
Jan 5, 2026
Merged

Add UTC timezone to dates fetched from the database.#12
calavera merged 3 commits intomainfrom
optional_date_without_timezone

Conversation

@calavera
Copy link
Contributor

@calavera calavera commented Jan 3, 2026

When we store the created_at objects in the database, they're stored as timestamp automatically. Unfortunately, they're restored without any timezone information, making them invalid strings to parse as RCF3339.

I'm creating a custom type that can handle those cases when we read the data. Preserving the format when we serialize it to other clients.

The dates are always UTC, so we don't need to worry about other timezone offsets except +00:00, or Z as a shortcut.

When we store the created_at objects in the database, they're stored
as timestamp automatically. Unfortunately, they're restored without
any timezone information, making them invalid strings to
parse as RCF3339.

I'm creating a custom type that can handle those cases when we
read the data. Preserving the format when we serialize it to
other clients.

The dates are always UTC, so we don't need to worry about other
timezone offsets except +00:00, or Z as a shortcut.
@calavera calavera force-pushed the optional_date_without_timezone branch from dd9de4d to e286683 Compare January 5, 2026 18:37
@calavera calavera merged commit 8813514 into main Jan 5, 2026
2 checks passed
@calavera calavera deleted the optional_date_without_timezone branch January 5, 2026 18:41
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.

2 participants