chore: add IANA timezone column to site schema#806
Open
anonymoususer72041 wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
@RussH we want to merge this PR rather sooner than later as it needs to be included in a previous release regarding upcoming UTC work. |
de96a9e to
b5fd6cb
Compare
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.
Summary
This PR adds a new
time_zone_ianacolumn to thesitetable.Fresh installations now create the column as part of the base schema and existing installations receive it through schema update. The column defaults to
UTC.This PR intentionally does not change the existing legacy
site.time_zonecolumn, installer behavior, runtime timezone handling, timestamp storage or timestamp display behavior.Motivation
OpenCATS currently relies on a legacy numeric timezone offset. This is not sufficient for future timezone-aware timestamp handling, especially if timestamp storage is later migrated toward UTC and display logic needs to use real regional timezone rules.
Before the installer or settings screens can start writing an IANA timezone identifier, the database schema must provide a place to store it. This is especially important for upgraded installations: the installer may run before later schema migrations or setup changes can depend on the new field. Without adding the column first, future installer or upgrade logic would not be able to reliably persist the selected IANA timezone for both fresh and existing instances.
This PR is therefore a small preparatory schema change. It makes
site.time_zone_ianaavailable while keeping all existing offset-based behavior unchanged. The actual transition to writing IANA timezone values, changing runtime timezone handling, migrating timestamps to UTC, ..., are intentionally left for follow-up PRs.