Moment Timezone

IANA time zone support for Moment.js — parse, convert, and format dates in any zone with automatic DST handling.

Library
npm
v0.6.4
3,878 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
82 /100 Excellent
Development Activity 72
Maintenance 68
Community 88
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
77 /100 Good
Architecture 80
Code Quality 78
Innovation 80
Learning Curve 75

Moment Timezone is an add-on for Moment.js that brings full IANA (Olson) time zone support to date handling in JavaScript. It lets you take any moment and convert, display, or compute it in a named zone such as ‘America/New_York’ or ‘Asia/Tokyo’, correctly accounting for historical offsets and daylight saving time transitions.

Bundled with the IANA time zone database, it exposes a small moment.tz API layered directly onto Moment’s chainable interface, plus utilities to guess the user’s zone, list zones by country, and load trimmed data sets to keep bundle size down. Note that Moment.js and this add-on are now in maintenance mode; for new projects the maintainers recommend a modern alternative such as Luxon or date-fns.

What You Get

  • A moment.tz() constructor and .tz() chaining method that convert any moment into a named IANA zone
  • The bundled IANA (Olson) time zone database with correct historical offsets and DST rules
  • Zone-guessing (moment.tz.guess()), per-country zone listing, and default-zone helpers
  • Data-loading utilities to pack, filter, and ship trimmed zone data for smaller bundles
  • TypeScript definitions that augment the Moment module for typed zone operations

Common Use Cases

  • Displaying a single UTC timestamp correctly across users in different time zones
  • Scheduling and computing events against a fixed business zone regardless of server locale
  • Detecting the browser’s current time zone to localize dates client-side
  • Handling daylight saving time boundaries and ambiguous or invalid local times

Under The Hood

Architecture — moment-timezone.js is a single UMD module that wraps and augments Moment.js, attaching a moment.tz object and Moment.prototype.tz method. Zone data is stored in a compact packed base-60 string format that unpack()/unpackBase60() decode into Zone objects holding parallel untils/offsets/abbrs arrays; Zone.prototype._index runs a binary-search (closest) over the untils boundaries to find the applicable offset for a given timestamp, while parse resolves ambiguous and invalid local times via the moveAmbiguousForward/moveInvalidForward flags. Zone guessing (guess, ZoneScore, userOffsets) scores candidate zones against the runtime’s observed offsets. index.js is the default entry that loads data/packed/latest.json before re-exporting moment.

Tech Stack — Plain ES5 JavaScript (99.98% of the codebase) with one runtime dependency, moment ^2.29.4. The build uses Grunt (grunt-contrib-uglify, grunt-contrib-jshint, grunt-contrib-nodeunit, grunt-exec) driven by Gruntfile.js and tasks/, with hand-maintained TypeScript definitions (index.d.ts, moment-timezone-utils.d.ts) and the IANA (Olson) database as the underlying data source, versioned under data/ in meta, unpacked, and packed forms.

Code Quality — A substantial nodeunit test suite lives under tests/moment-timezone/ (parse, zone, guess, load, pack/unpack, base-60, add, link, utc, manipulate, and more), complemented by typing-tests/ that exercise the TypeScript definitions. Code style is enforced by .jshintrc and .editorconfig. The implementation is terse ES5 with small single-purpose functions and clear naming; as an established maintenance-mode project, coverage of the core encoding, lookup, and parsing paths is solid.

API Design — The public surface is small and ergonomic, layering onto Moment’s chainable style: moment().tz('America/Los_Angeles').format(...), plus moment.tz.guess(), moment.tz.zonesForCountry(), moment.tz.names(), and setDefault(). It requires almost no boilerplate to adopt in an existing Moment codebase, is documented on the momentjs.com timezone site with runnable examples, and is fully typed. A few methods (e.g. Zone.offset) are marked deprecated in favor of utcOffset, reflecting the library’s long history.

Used by 35 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
68%
Apache 2.0

Appsmith

Automation · Developer Tools · No Code Platforms

40,959

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
93
Repo Health
79
Technical
66
Dependency
Built with
TypeScript 68%
Java 21%
Updated 6 days ago
Python
68%
Other

Baserow

Databases · No Code Platforms

6,012

Open-source no-code platform to build databases, apps, automations, and AI agents — self-hosted or cloud, with full data ownership.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Python 68%
JavaScript 16%
Vue 11%
Updated 5 days ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,916

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
90
Repo Health
77
Technical
61
Dependency
Built with
TypeScript 97%
Updated 6 days ago
JavaScript
99%
Other

ChartBrew

Analytics · Databases

4,063

Open-source reporting platform to build live dashboards from SQL, NoSQL, APIs, and SaaS tools with an AI assistant that creates charts from natural language.

View details
90
Repo Health
83
Technical
64
Dependency
Built with
JavaScript 99%
Updated 1 weeks ago
TypeScript
53%
Other

Chaskiq

CRM · Customer Support

3,574

Self-hosted live chat, video calls, help center, and marketing automation — a full-stack Intercom alternative you run on your own infrastructure.

View details
57
Repo Health
66
Technical
66
Dependency
Built with
TypeScript 53%
Ruby 36%
Updated 3 months ago
Java
48%
Apache 2.0

ClearFlask

Community · Product Management

451

Open-source feedback management and roadmap tool that lets product teams collect, prioritize, and respond to user input — with AI-powered summarization and full self-hosting control.

View details
83
Repo Health
73
Technical
62
Dependency
Built with
Java 48%
TypeScript 47%
Updated 6 days ago
JavaScript
83%
Other

Countly

Analytics · Marketing

5,908

Privacy-first, self-hosted analytics and customer engagement platform with full data ownership, GDPR compliance, and AI-powered insights across mobile, web, desktop, and IoT.

View details
96
Repo Health
82
Technical
65
Dependency
Built with
JavaScript 83%
Updated 4 days ago
Ruby
61%
GPL 2.0

Discourse

Community

47,915

Open-source community platform with dynamic trust levels, real-time chat, and a powerful plugin architecture for self-hosted forums.

View details
89
Repo Health
89
Technical
67
Dependency
Built with
Ruby 61%
JavaScript 32%
Updated 4 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers