Skip to content

Hardcode app timezone to UTC - #4134

Open
williamjallen wants to merge 1 commit into
Kitware:masterfrom
williamjallen:app-timezone-utc
Open

williamjallen wants to merge 1 commit into
Kitware:masterfrom
williamjallen:app-timezone-utc

Conversation

@williamjallen

Copy link
Copy Markdown
Collaborator

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant