Repository navigation
Conversation
BC has stayed on UTC-7 since 2026-03-08. DateTime::TimeZone 2.68+ labels
America/Vancouver "MST" from 2026-11-01, but BC's official abbreviation is
PCT (Pacific Time; BC news release 2026CITZ0009-001073, 2026-09-17).
formatDateTime now swaps the tzdata abbreviation for the official one via
WeBWorK::Utils::TimeZoneLabels, only for America/Vancouver and only where
tzdata says MST: summer 2026 stays PDT, earlier winters PST, and other MST
zones (Phoenix, Dawson Creek) are untouched. parseDateTime accepts PCT, so
exported set definition files ("12/01/2026 at 11:59pm PCT") import back to
the same time.
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.
BC has stayed on UTC-7 since 2026-03-08. With DateTime::TimeZone 2.71 (#59), dates from 2026-11-01 show as e.g. "December 1, 2026, 11:59:00 PM MST", tzdata's label. BC's official abbreviation is PCT (Pacific Time; BC Citizens' Services news release 2026CITZ0009-001073, 2026-09-17). This PR shows PCT instead.
How
WeBWorK::Utils::TimeZoneLabelsmapsAmerica/Vancouver+ tzdataMST→PCT.formatDateTimepasses its output through it, using the abbreviation tzdata gives for that instant. Every server-rendered zone label goes throughformatDateTime, so nothing else needs changing.parseDateTimeacceptsPCT. Without that, exported set definition files (12/01/2026 at 11:59pm PCT) would import with a "Time zone 'PCT' not recognized" warning and fall back to the course zone.What does not change
datetime_format_shorthas no zone.datetime_format_fullprints the zone name.Tests
t/time_zone_labels.t: 16 cases.prove tpasses all 53 in perl:5.38.Release: tag v2.20.10, pin it in configuration and ship it with CHG0103333 (prod, 2026-10-26), which already carries v2.20.9.