Skip to content

Configurable display timezone, dependency updates, v1.0.4 - #5

Merged
chriselsen merged 3 commits into
mainfrom
feat/configurable-timezone-and-deps
Aug 23, 2026
Merged

chriselsen merged 3 commits into
mainfrom
feat/configurable-timezone-and-deps

Conversation

@chriselsen

Copy link
Copy Markdown
Contributor

Summary

Makes the local-time display timezone configurable instead of hardcoded to
NZ, fixes a related date-boundary bug, and does routine dependency
maintenance.

Configurable timezone

  • Add TIMEZONE environment variable (IANA name, default Pacific/Auckland)
    controlling the local time shown alongside UTC in remarks/metadata
  • Replace the hardcoded NZ-only Intl.DateTimeFormat instances with a
    per-timezone formatter cache, built once per distinct timezone string used
    in a run
  • Fall back to the default timezone (with a logged warning) if an invalid
    IANA timezone string is configured, instead of throwing
  • Generalize remarks/labels from NZ/NZT to Local, since the configured
    zone is no longer necessarily NZ — the actual abbreviation (e.g. NZST,
    AEST) still comes from Intl's timeZoneName
  • Fixes the forecast table dates using the UTC calendar day instead of the
    configured local calendar day (toLocalDate, formerly toNzDate) — dates
    near a UTC day boundary could previously show the wrong local day

Dependency updates

  • @tak-ps/etl 10.9.0 → 10.13.0 (changelog reviewed: additive only —
    permissions validation, new capabilities format, tooling)
  • eslint 10.8.0 → 10.9.0
  • typescript-eslint 8.65.0 → 8.67.0
  • typescript stays pinned at 6.0.3 (latest 6.x): typescript-eslint's peer
    range still caps at <6.1.0, so TypeScript 7.x isn't yet installable
    alongside it without breaking lint/type-checking
  • Version bumped to 1.0.4, CHANGELOG updated

Testing

  • npx tsc --noEmit — passes
  • npm run lint — passes
  • npm run build — passes
  • npm audit — 0 vulnerabilities
  • Manually verified timezone formatting against the default zone (NZ), an
    alternate zone (Australia/Sydney), and an invalid zone string (confirms
    fallback + warning) via a standalone script

Not verified: end-to-end run against the live Google Flood Forecasting API
(requires API_KEY/ETL_* credentials).

Blocked / follow-ups

  • None blocking. Revisit pinning typescript to 7.x once typescript-eslint
    adds support.

- @tak-ps/etl 10.9.0 -> 10.13.0
- eslint 10.8.0 -> 10.9.0
- typescript-eslint 8.65.0 -> 8.67.0

typescript stays pinned at 6.0.3 (latest 6.x): typescript-eslint's peer
dependency still caps at <6.1.0, so TypeScript 7.x is not yet
installable alongside it without breaking lint/type-checking.

Verified: npm run build, npm run lint, tsc --noEmit, npm audit (0
vulnerabilities) all pass.
- Add TIMEZONE env var (IANA name, default Pacific/Auckland) controlling
  the local time shown alongside UTC in remarks/metadata
- Replace hardcoded NZ-only Intl.DateTimeFormat instances with a
  per-timezone formatter cache (getFormatters), built once per distinct
  timezone string used in a run
- Fall back to the default timezone (with a logged warning) if an
  invalid IANA timezone string is configured, instead of throwing
- Generalize remarks/labels from 'NZ'/'NZT' to 'Local' since the
  configured zone is no longer necessarily NZ (actual abbreviation like
  NZST/AEST still comes from Intl's timeZoneName)
- Fixes forecast table dates using the UTC calendar day instead of the
  configured local calendar day (toLocalDate, formerly toNzDate)
@chriselsen
chriselsen merged commit 881b6f3 into main Aug 23, 2026
1 check passed
@chriselsen
chriselsen deleted the feat/configurable-timezone-and-deps branch August 23, 2026 00:13
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