keep-tzdb-current
Use when a service stores or converts timezones — update and pin the IANA tz database, because governments change offsets and a stale copy silently computes the wrong instant.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 80
- Forks
- 17
01 前言 Front Matter
- name
- keep-tzdb-current
- description
- Use when a service stores or converts timezones — update and pin the IANA tz database, because governments change offsets and a stale copy silently computes the wrong instant.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md343 B
- 参考文档TRUST.auto.yaml2.1 KB
03 SKILL.md 正文
Keep the tz database current
Timezone rules are data, and states change them (Chile, Morocco, Kazakhstan and dozens more have moved within the last few years). A stale tz database is not a bug in your code — until a scheduled job fires an hour off — so treat tzdata like any other dependency you patch.
Procedure
- Find every tzdata source in the stack — OS, language runtime, container, and any vendored copy:
dpkg -l tzdata 2>/dev/null; pip show tzdata tzdata 2>/dev/null; python3 -c "import zoneinfo; print(zoneinfo.TZPATH)"
npm ls --all 2>/dev/null | grep -i tzdata
- Check the version actually loaded, not just the installed file:
python3 -c "import importlib.metadata as m; print('tzdata', m.version('tzdata'))"
zdump -v America/Santiago | tail -4
- Pin the data source explicitly so it does not depend on the host. In Python, install the
tzdatawheel and prefer it over the system copy in containers:
pip install "tzdata>=2025.1" # pure-Python fallback used when /usr/share/zoneinfo is absent
- Update on a cadence and on news of a change; IANA publishes ~4-6 releases a year:
apt-get update && apt-get install -y --only-upgrade tzdata
pip install -U tzdata
- Add a check that fails CI when the data is older than a threshold:
import importlib.metadata as m, datetime as dt
v = m.version("tzdata") # 2025.1 -> year 2025
assert int(v.split(".")[0]) >= 2025, f"tzdata stale: {v}"
- Keep Node/Browser data in sync: browsers carry their own ICU data, so server and client can differ. Compare a known-changed rule:
Intl.DateTimeFormat("en", {timeZone:"America/Santiago", timeZoneName:"short"}).format(new Date())
- After any upgrade, re-run the DST test matrix and diff
zdumpoutput for the zones you schedule against.
Pitfalls
- A container built with
--no-install-recommendsmay ship no tzdata at all;ZoneInfothen silently falls back to UTC instead of erroring. - Upgrading tzdata can change a stored business-date mapping retroactively; historical reports can shift. Freeze the rule for past periods if that matters (e.g. financial ledgers).
- Java bundles its own tzdb in the JDK; upgrading the OS package does not help the JVM until the JDK is patched.
- Locking a dependency without pinning tzdata means two builds a month apart can produce different schedules from identical code.
- Browsers update ICU on their own cadence, so a correct server can still render a stale offset client-side; the server is the source of truth.
Verification
python3 -c "import importlib.metadata as m; print(m.version('tzdata'))" && zdump -v Europe/London | grep 2026 | head -2
A version at or above the latest IANA release and a zdump that shows the current 2026 transitions = the data is live. Report: "tzdata pinned at the current release, CI fails below the year threshold, zones re-checked with zdump after upgrade."
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.