Skip to content

build: default TZ to UTC instead of Europe/Dublin (#970) - #1001

Open
ismisepaul wants to merge 1 commit into
devfrom
dev#970-tz-utc
Open

ismisepaul wants to merge 1 commit into
devfrom
dev#970-tz-utc

Conversation

@ismisepaul

Copy link
Copy Markdown
Member

Fixes #970.

What

.env shipped TZ=Europe/Dublin, and docker compose passes it to the MariaDB, Tomcat and MongoDB containers. Dublin moves an hour twice a year. On the last Sunday of October, 01:00–02:00 happens twice, so suspension times and results written in that hour can't be told apart. Nothing told operators the setting existed either.

  • .env: TZ=UTC, with a comment saying what it sets and that it takes any IANA zone.
  • README.md: a new Timezone section under the Docker setup. It covers:
    • the default and how to change it;
    • that stored timestamps and the CTF start/lock/end times use this zone;
    • an upgrade note for installs that never changed TZ: what moves to UTC, and how to keep Europe/Dublin.

This doesn't fix the timezone-dependent code paths themselves (#841, #843). Operators can still set any TZ, so the code has to keep working when it isn't UTC. Showing the server timezone next to the CTF schedule fields, the optional item in the issue, is not included.

Checked

  • docker compose config gives TZ: UTC for all three services.
  • mariadb:12.3, tomcat:11.0-jre17-temurin and mongo all report UTC with TZ=UTC, and IST with TZ=Europe/Dublin, so the variable takes effect in each image.
  • Every step of test.yml passed locally (lint, build, PGP check, compose build, Tomcat config check, unit tests, integration tests).

🤖 Generated with Claude Code

.env set TZ=Europe/Dublin for the database, Tomcat and MongoDB
containers. Dublin moves an hour twice a year, so timestamps stored in
the repeated hour can't be told apart, and nothing told operators the
setting existed. UTC has no gaps or repeats and matches CI and a plain
mariadb container. Operators can still set any IANA zone.

Document the setting, what it affects (stored timestamps and the CTF
schedule), and what changes for an existing install that didn't change
TZ.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ismisepaul ismisepaul added this to the 4.0.0 milestone Oct 25, 2026
Copilot AI balanced review requested due to automatic review settings October 25, 2026 00:19
@ismisepaul ismisepaul moved this from Backlog to Next Release Backlog in Security Shepherd Oct 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The upgrade guidance incorrectly assures operators that expired suspensions are unaffected, although recently expired suspensions can temporarily block login again.

1 open issue
What changed in this PR

Changes the Docker stack’s default timezone to UTC to avoid daylight-saving gaps and repeated hours, while preserving operator-configurable timezones. The underlying timezone-dependent code paths remain out of scope.

Changes:

  • Defaults TZ to UTC and documents supported timezone values.
  • Explains timezone effects on stored timestamps, CTF schedules, and upgrades.
File Description
README.md Adds timezone configuration and upgrade guidance.
.env Defaults container timezones to UTC with explanatory comments.

Review effort: Balanced

Comment thread README.md

Upgrading from a release that shipped `TZ=Europe/Dublin`: unless you changed `TZ`, your environment moves to UTC on the next `docker-compose up`. To keep the old behaviour, set `TZ=Europe/Dublin` in `.env`. Otherwise:
* Times stored during Irish summer time read an hour later than they happened. Winter times are unchanged.
* An active suspension can last up to an hour longer. Expired ones are unaffected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Next Release Backlog

Development

Successfully merging this pull request may close these issues.

Default TZ to UTC instead of Europe/Dublin

2 participants