Repository navigation
fix: use dynamic timezone abbreviation in PR comment timestamp - #209
Merged
Merged
Conversation
The PR comment timestamp formatted the time with the configured timezone but appended a hardcoded "PT" label, so any non-Pacific timezone (including the America/Toronto default) showed the correct time with a misleading label. Use Intl's timeZoneName: 'short' option to emit the matching abbreviation instead. Closes #187
Coverage report
Test suite run success28 tests passing in 4 suites. Report generated by 🧪jest coverage report action from dfdc3bf |
argocd-diff-action-bot Bot
pushed a commit
that referenced
this pull request
May 24, 2026
## [0.6.12](0.6.11...0.6.12) (2026-05-24) ### ⚠ BREAKING CHANGES * run on Node 24 runtime and upgrade dependencies (#208) ### Build & Dependencies * **deps-dev:** upgrade pnpm to 11.2.2 ([#207](#207)) ([f69a1e6](f69a1e6)) ### Documentation * add CLAUDE.md ([664ab77](664ab77)) ### Features * run on Node 24 runtime and upgrade dependencies ([#208](#208)) ([13477ad](13477ad)), closes [#175](#175) ### Bug Fixes * use dynamic timezone abbreviation in PR comment timestamp ([#209](#209)) ([81f8e40](81f8e40)) [skip release]
Contributor
|
🎉 This PR is included in version 0.6.12 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
Fixes #187. The PR comment timestamp formats the time using the configured
timezoneinput but appends a hardcodedPTlabel:The time shifts with the timezone; the
PTlabel never does. Since thetimezoneinput defaults toAmerica/Toronto(Eastern), the label is already wrong out of the box.Fix
Drop the literal and let
Intlemit the matching abbreviation via thetimeZoneName: 'short'option.America/Toronto(default)… p.m. PT❌… p.m. EDT✅America/Los_Angeles… p.m. PT… p.m. PDTEurope/Berlin… p.m. PT❌… p.m. GMT+2UTC… p.m. PT❌… p.m. UTCFor IANA zones without a common abbreviation,
Intlfalls back to aGMT±Noffset — still correct.Notes
dist/index.jsis intentionally not included;semantic-releaseregeneratesdist/**on release.pnpm run buildandpnpm run lintpass. No tests assert on this string.