Skip to content

fix: rely on IANA Vancouver timezone#1666

Merged
Jacky-Pham merged 2 commits into
mainfrom
Jacky/1600-pacific-time-no-dst
May 28, 2026
Merged

fix: rely on IANA Vancouver timezone#1666
Jacky-Pham merged 2 commits into
mainfrom
Jacky/1600-pacific-time-no-dst

Conversation

@Jacky-Pham
Copy link
Copy Markdown
Collaborator

@Jacky-Pham Jacky-Pham commented May 26, 2026

Summary

  • removes the custom fixed UTC-7/PacT transition logic
  • relies on the IANA America/Vancouver timezone for legislative Pacific Time handling
  • centralizes NOC date calculation through DateUtil so API paths use the same timezone helper
  • adds regression coverage to make sure the helper delegates to America/Vancouver

Testing

  • PYTHONPATH=src /Users/JPHAM/Library/Caches/pypoetry/virtualenvs/strr-api-ETjmZK4t-py3.14/bin/python -m pytest tests/unit/utils/test_date_util.py --no-cov
  • /Users/JPHAM/Library/Caches/pypoetry/virtualenvs/strr-api-ETjmZK4t-py3.14/bin/python -m isort . --check -v
  • /Users/JPHAM/Library/Caches/pypoetry/virtualenvs/strr-api-ETjmZK4t-py3.14/bin/python -m black . --check
  • git diff --check

Closes #1600

@bcregistry-sre
Copy link
Copy Markdown
Collaborator

Temporary Url for review: https://strr-hosts-dev--pr-1666-m0tu559t.web.app

@Jacky-Pham Jacky-Pham force-pushed the Jacky/1600-pacific-time-no-dst branch from cf4fb81 to e821a5b Compare May 26, 2026 21:58
@bcregistry-sre
Copy link
Copy Markdown
Collaborator

Temporary Url for review: https://strr-hosts-dev--pr-1666-m0tu559t.web.app

@dimak1
Copy link
Copy Markdown
Collaborator

dimak1 commented May 27, 2026

@Jacky-Pham can these changes be applied right away or is there a scheduled date we need to target?

@Jacky-Pham
Copy link
Copy Markdown
Collaborator Author

@Jacky-Pham can these changes be applied right away or is there a scheduled date we need to target?

There should be no significant impact to users and we need to make sure this is working as soon as possible as per SRE. The effective transition date was already March 8, 2026 so we need these in sooner rather then later

Copy link
Copy Markdown
Collaborator

@dimak1 dimak1 left a comment

Choose a reason for hiding this comment

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

Added a few comments. Also, please bump up the versions in apps that were changed. Thanks!


const HISTORICAL_PACIFIC_TIME_ZONE = 'America/Vancouver'
const PACIFIC_TIME_ZONE = 'UTC-7'
const PACIFIC_TIME_TRANSITION_UTC = DateTime.fromISO('2026-03-08T10:00:00Z', { zone: 'UTC' })
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should have some comment regarding this hardcoded date.

const PACIFIC_TIME_ZONE = 'UTC-7'
const PACIFIC_TIME_TRANSITION_UTC = DateTime.fromISO('2026-03-08T10:00:00Z', { zone: 'UTC' })

function asPacificTime (date: DateTime): DateTime {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we need to define exact same functions here in host app, when base already have it? There are quite some duplication between here and date utils in base-web.

@Jacky-Pham Jacky-Pham force-pushed the Jacky/1600-pacific-time-no-dst branch from e821a5b to 73b2db2 Compare May 27, 2026 23:32
@Jacky-Pham Jacky-Pham changed the title fix: use fixed Pacific Time after DST transition fix: rely on IANA Vancouver timezone May 27, 2026
@Jacky-Pham Jacky-Pham force-pushed the Jacky/1600-pacific-time-no-dst branch from 73b2db2 to 8afbc6d Compare May 28, 2026 16:09
@Jacky-Pham
Copy link
Copy Markdown
Collaborator Author

Jacky-Pham commented May 28, 2026

Updated this after the timezone discussion:

  • removed the custom hardcoded changes, so the old host-web comments should be outdated now
  • current diff is API-only and relies on IANA America/Vancouver
  • bumped only strr-api since no web apps are changed anymore

Copy link
Copy Markdown
Collaborator

@dimak1 dimak1 left a comment

Choose a reason for hiding this comment

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

Looks cleaner now, approve

@sonarqubecloud
Copy link
Copy Markdown

@Jacky-Pham Jacky-Pham merged commit 3fb6263 into main May 28, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Ensure no bugs arise from the new mandate to no longer support Daylight Savings time.

3 participants