
Security News
Meet the Socket Team at RSAC and BSidesSF 2025
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
windows-iana
Advanced tools
This library exports two functions to help convert from Windows time zones to IANA time zones (based on this mapping definition and this list of IANA aliases).
Add the dependency to your project with npm install --save windows-iana
or yarn add windows-iana
.
The library exports:
findIana()
: will return an array of possible IANA time zones, including all their aliases.findOneIana()
: will return just one string.findWindows()
: will return a string with a Windows time zone.findAlias()
: will an array of all IANA aliases, including the one passed as a parameter.findOneIana()
import { findOneIana } from "windows-iana";
const result = findOneIana("Romance Standard Time");
console.log(result); // "Europe/Paris"
You may also pass the territory code as a second parameter (have a look again at the mapping by unicode.org for more details).
import { findOneIana } from "windows-iana";
const result = findOneIana("Romance Standard Time", "ES");
console.log(result); // "Europe/Madrid"
findIana()
import { findIana } from "windows-iana";
const result = findIana("Romance Standard Time");
console.log(result); // ["Europe/Paris"]
You may also pass the territory code to findIana()
.
import { findIana } from "windows-iana";
const result = findIana("Romance Standard Time", "ES");
console.log(result); // ["Europe/Madrid", "Africa/Ceuta"]
findWindows()
import { findWindows } from "windows-iana";
const result = findWindows("America/New_York");
console.log(result); // Eastern Standard Time
There is no territory code for this function because all IANA names map to exactly one territory.
findAlias()
import { findAlias } from "windows-iana";
const result = findAlias("America/New_York");
console.log(result); // ["America/New_York", "US/Eastern"]
FAQs
A small tool to convert between Windows time zones and IANA
We found that windows-iana demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
Security News
Biome's v2.0 beta introduces custom plugins, domain-specific linting, and type-aware rules while laying groundwork for HTML support and embedded language features in 2025.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.