Repository navigation
Hardcode app timezone to UTC - #4134
Open
williamjallen wants to merge 1 commit into
Open
williamjallen wants to merge 1 commit into
williamjallen wants to merge 1 commit into
Conversation
CDash is currently inconsistent about how timestamp timezones are treated. Timestamps are stored in the database as UTC for the most part, but upon retrieval they're treated as UTC, the value of APP_TIMEZONE, or UTC shifted by the project's nightly time. One particularly common pattern is `Carbon::now()` or casts to Carbon datetimes with no timezone. Timestamps without a timezone are incorrectly treated as the APP_TIMEZONE. The most prominent places where these issues are visible to users are the `/projects` and `/projects/<id>` pages which show times as "in the future" for most configurations. This PR hardcodes the app and database timezones to UTC, and ensures that all GraphQL casts are as UTC. APP_TIMEZONE now controls the scheduled jobs schedule only.
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.
CDash is currently inconsistent about how timestamp timezones are treated. Timestamps are stored in the database as UTC for the most part, but upon retrieval they're treated as UTC, the value of APP_TIMEZONE, or UTC shifted by the project's nightly time. One particularly common pattern is
Carbon::now()or casts to Carbon datetimes with no timezone. Timestamps without a timezone are incorrectly treated as the APP_TIMEZONE. The most prominent places where these issues are visible to users are the/projectsand/projects/<id>pages which show times as "in the future" for most configurations.This PR hardcodes the app and database timezones to UTC, and ensures that all GraphQL casts are as UTC. APP_TIMEZONE now controls the scheduled jobs schedule only.