Socket
Book a DemoInstallSign in
Socket

dayjs-timezone-iana-plugin

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dayjs-timezone-iana-plugin

DayJS timezone plugin alternative to manage DST correctly

0.2.0
latest
Source
npmnpm
Version published
Weekly downloads
15K
23.03%
Maintainers
3
Weekly downloads
 
Created
Source

Dayjs-timezone-iana-plugin

DayJS timezone plugin alternative to manage DST correctly, using https://www.iana.org/time-zones

Usage

   npm i dayjs-timezone-iana-plugin

In the code:

   // -> remove dayjs.extend(timezone)
   dayjs.extend(utc)
   dayjs.extend(require('dayjs-timezone-iana-plugin'))

   dayjs('2014-06-01 12:00').tz('America/New_York')
   // You can set a default timezone
   dayjsFactory.tz.setDefault('America/New_York')

Philosophy

The code is quite simple and is largely inspired by moment-timezone.

It includes the latest database IANA 2021e (96KB compressed). It takes more space than the method used by DayJS or Luxon. But it works even if NodeJS is compiled with small-icu.

How to update IANA DB

Todo

  • Add lot of tests (see moment-timezone tests)

Changelog

0.2.0

  • Update iana timezone db (2025)

0.1.0

  • First version

Maintained by https://carbone.io/ and https://www.easilys.com/

FAQs

Package last updated on 25 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.