Skip to content

Replace @vvo/tzdb with Intl timezone APIs - #12

Merged
Igloczek merged 3 commits into
masterfrom
task/014-replace-tzdb-with-intl
Jun 30, 2026
Merged

Igloczek merged 3 commits into
masterfrom
task/014-replace-tzdb-with-intl

Conversation

@Igloczek

@Igloczek Igloczek commented Jun 30, 2026 •

Copy link
Copy Markdown
Collaborator

Implements tasks/014-replace-tzdb-with-intl.md from the ponytail audit backlog.

Goal

Remove the @vvo/tzdb dependency and hand-rolled offset helper in util-frontend.ts.

Scope

  • Replace getTimeZones() usage in src/components/settings/General.vue and src/pages/EditMaintenance.vue.
  • Build timezone list from Intl.supportedValuesOf('timeZone') (with fallback list if needed for older engines).
  • Replace getTimezoneOffset() hack with Intl.DateTimeFormat / formatToParts offset derivation.
  • Remove @vvo/tzdb from package.json.

Acceptance criteria

  • @vvo/tzdb absent from package.json and bun.lock.
  • Timezone dropdown still populates and sorts sensibly.
  • Selected timezone persists and applies correctly in maintenance schedules.
  • bun run lint passes.
  • bun run build:frontend succeeds.

Depends on

Nothing.

Verification

bun run lint
bun run build:frontend
rg "@vvo/tzdb|getTimezoneOffset" src package.json

Audit reference

Finding #19 — @vvo/tzdb + offset helper.

@Igloczek

Copy link
Copy Markdown
Collaborator Author

/ponytail-review

util-frontend.ts:L6-33: yagni: 26-entry static fallback is heavier than [UTC, resolvedOptions().timeZone], but task 014 explicitly requires a fallback list for older engines.

util-frontend.ts:L90-95: native: dayjs format("Z") for label while Intl already computes offset — acceptable; dayjs probe still filters zones unsupported by maintenance scheduling.

net: -1 dependency. Ship.

3 files changed, 76 insertions(+), 31 deletions(-)

@Igloczek
Igloczek force-pushed the task/014-replace-tzdb-with-intl branch from 409a37d to 5e82d9a Compare June 30, 2026 12:03
Igloczek added 3 commits June 30, 2026 14:14
Remove the @vvo/tzdb dependency and build the timezone dropdown from
Intl.supportedValuesOf('timeZone') with a static fallback for older engines.
Derive UTC offsets via Intl.DateTimeFormat formatToParts instead of the
hand-rolled toLocaleString hack.
@Igloczek
Igloczek force-pushed the task/014-replace-tzdb-with-intl branch from 5e82d9a to 46c0120 Compare June 30, 2026 12:15
@Igloczek
Igloczek merged commit f0a125a into master Jun 30, 2026
1 check passed
@Igloczek
Igloczek deleted the task/014-replace-tzdb-with-intl branch June 30, 2026 12:58
Igloczek added a commit that referenced this pull request Aug 8, 2026
Replace @vvo/tzdb with Intl timezone APIs
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.

1 participant