gmt-timezone

Converts, formats, and computes timezone-aware datetimes with DST disambiguation using the Temporal API.

6|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/northguild/gmt --skill gmt-timezone-northguild
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gmt-timezone
Source: https://github.com/northguild/gmt/tree/main/packages/gmt/skills/gmt-timezone
Command: npx skills add https://github.com/northguild/gmt --skill gmt-timezone-northguild

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @northguild/gmt.

What problem does it solve? JavaScript date handling breaks down around timezones: DST gaps and overlaps, offset-versus-zone confusion, and UTC-based bucketing that misaligns with local days. This Skill guides correct use of the @northguild/gmt library's zoned APIs so conversions, arithmetic, and boundaries respect real IANA timezone rules. ## Core Features & Use Cases - Zoned conversion and formatting: Get the current time in any IANA zone, convert between plain, zoned, UTC, and Unix representations, and format zoned datetimes and ranges. - DST-safe arithmetic and boundaries: Add or subtract durations across DST transitions with explicit disambiguation, and compute real zone boundaries (startOfZoned, endOfZoned) that are never after the input. - Zone-aware bucketing: Floor or bucket instants on local calendar boundaries with floorToZone and bucketRange for observability rollups and daily aggregates. - Use Case: Group a stream of UTC event timestamps by local day in America/New_York, correctly producing 23-hour and 25-hour buckets across DST transitions instead of drifting 24-hour UTC buckets. ## Quick Start Ask the assistant to convert a plain datetime to America/New_York time and compute the start of that local day using the gmt-timezone skill.

Frequently Asked Questions about gmt-timezone

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a local datetime to a specific timezone in JavaScript?▼

Use convertPlainDateTimeToZoned from @northguild/gmt with an IANA zone id like America/New_York. Pass a disambiguation option (compatible, earlier, later, or reject) to control how DST gaps and overlaps are resolved.

How do I handle DST gaps and overlaps when adding time to a zoned datetime?▼

addZoned accepts a disambiguation option, but it only affects fall-back overlaps, not spring-forward gaps. For gap safety, use convertPlainDateTimeToZoned with the reject mode, or classify the wall time first with classifyLocal.

Why is a UTC offset not the same as a timezone?▼

An offset like -05:00 is a fixed shift and cannot observe DST rules, while an IANA zone like America/New_York carries full transition history. Use toOffsetInstant to split a timestamp into instant, offset, and optional zone when both are needed.

How do I group UTC timestamps by local day without drift?▼

Use floorToZone or bucketRange with the target IANA zone so buckets follow local calendar boundaries. Days that spring forward are 23 hours and fall-back days are 25, which keeps daily aggregates aligned instead of forcing uniform 24-hour UTC buckets.

Why does truncating a zoned datetime sometimes land after the input?▼

roundZoned follows TC39 ZonedDateTime.round, which rounds the wall clock and re-resolves it in the zone, so trunc mode can move forward across a DST transition. Use floorToZone or startOfZoned with no options to get a true boundary.

Does gmt support calendar-annotated zoned strings like Japanese eras?▼

Yes, but only addZoned, subtractZoned, diffZoned, convertZonedToCalendar, and zoned interval functions accept the [u-ca=...] annotation, which GMT places before the timezone bracket. Always produce these strings with convertZonedToCalendar.