From a123edbeb77e2538232d58602ce5de84d17e4392 Mon Sep 17 00:00:00 2001 From: Pan Luo Date: Fri, 23 Oct 2026 10:00:36 -0700 Subject: [PATCH] fix(docker): install DateTime::TimeZone 2.71 for BC permanent UTC-7 BC no longer falls back on 2026-11-01. Ubuntu 24.04's libdatetime-timezone-perl is 2.62 (Olson 2024a) and will not be updated, and DateTime uses its own zone data, not /usr/share/zoneinfo, so WeBWorK would show Nov-Mar dates an hour early as "PST" and parse set-def/default dates an hour late. 2.68+ has the BC change; install 2.71 from CPAN (it lands in /usr/local/share/perl, ahead of the apt copy in @INC) and fail the build if America/Vancouver is not UTC-7 in December 2026. --- Dockerfile | 7 +++++++ Dockerfile-prod | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/Dockerfile b/Dockerfile index 7c808ab3f3..028ebc988f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -190,6 +190,13 @@ RUN cpanm install -n \ Net::SAML2 \ && rm -fr ./cpanm /root/.cpanm /tmp/* +# DateTime::TimeZone - Ubuntu 24.04 ships 2.62 (Olson 2024a) and never updates it, and DateTime +# uses its own compiled zone data rather than /usr/share/zoneinfo. 2.68+ has BC's move to permanent +# UTC-7 (no fall back on 2026-11-01). The check fails the build if America/Vancouver would still +# fall back to UTC-8 in December 2026. +RUN cpanm install -n DateTime::TimeZone@2.71 && rm -fr ./cpanm /root/.cpanm /tmp/* \ + && perl -MDateTime -e 'exit(DateTime->from_epoch(epoch => 1796126400, time_zone => "America/Vancouver")->offset == -7 * 3600 ? 0 : 1)' + # ================================================================== # Phase 5 - Install webwork2 and pg which were downloaded to /opt/base/ in phase 1 # Option: Install the OPL in the image also (about 850 MB) diff --git a/Dockerfile-prod b/Dockerfile-prod index 8293a79db9..63e0ba5d23 100644 --- a/Dockerfile-prod +++ b/Dockerfile-prod @@ -248,6 +248,13 @@ RUN cpanm install -n \ Net::SAML2 \ && rm -fr ./cpanm /root/.cpanm /tmp/* +# DateTime::TimeZone - Ubuntu 24.04 ships 2.62 (Olson 2024a) and never updates it, and DateTime +# uses its own compiled zone data rather than /usr/share/zoneinfo. 2.68+ has BC's move to permanent +# UTC-7 (no fall back on 2026-11-01). The check fails the build if America/Vancouver would still +# fall back to UTC-8 in December 2026. +RUN cpanm install -n DateTime::TimeZone@2.71 && rm -fr ./cpanm /root/.cpanm /tmp/* \ + && perl -MDateTime -e 'exit(DateTime->from_epoch(epoch => 1796126400, time_zone => "America/Vancouver")->offset == -7 * 3600 ? 0 : 1)' + # App::Genpass - used by LTI1p3's CourseUpdater # Data::ObjectDriver - used by DelayedJob # Bytes::Random::Secure::Tiny - used by LTI1p3 for secure random string