Skip to content

Added the timezone to dates when deserializing from the database.#108

Merged
pSpitzner merged 1 commit intomainfrom
fixed_dateoffset
Jun 15, 2025
Merged

Added the timezone to dates when deserializing from the database.#108
pSpitzner merged 1 commit intomainfrom
fixed_dateoffset

Conversation

@semohr
Copy link
Collaborator

@semohr semohr commented Jun 15, 2025

closes #92

Datetimes do not have timezone information in sqllite. We use the server defaults func.now tho which always return times in utc. This PR adds timezone information to datetimes after they have be retrieved from the database, there is also a small test for it.

As we never set the dates manually this approach should be fine, if we at some point decide to update dates manually we need to consider only ever writing utc times to the database..

@pSpitzner pSpitzner merged commit fe861c1 into main Jun 15, 2025
2 checks passed
@pSpitzner pSpitzner deleted the fixed_dateoffset branch June 15, 2025 15:45
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.

Timezones are off

2 participants