
Security News
Socket Integrates With Bun 1.3’s Security Scanner API
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
timezone-convert
Advanced tools
timezone-convert is a small and efficient utility library and CLI for (smart parsing and) converting between timezone formats.
The primary goal of the project is to focus on converting from one timezone format into a roughly accurate representation in other formats for possible of use with other libraries (e.g Windows display name from calendar => TZID / IANA for datetime manipulation), and AS SIMPLE AS POSSIBLE, things like extensive array mapping (Windows id => Multiple IANA ids) won't be available.
The project will only supports the ETC
IANA ids that is also used by Windows, and only supports the commonly-used backward
IANA ids (like America/Indianapolis
), uncommon ids like WET
, W-SU
is not supported, but in a fast-check, this library should support a few more commonly-used ids than windows-iana
.
parseTzAuto(str)
npx timezone-convert "Europe/Athens"
# Outputs a JSON string of the parsed timezone
# { iana, windowsId, windowsDisplay }
# Example use with `jq`
npx -y timezone-convert Asia/Saigon | jq '.windowsDisplay'
# npm
npm install timezone-convert
# bun
bun add timezone-convert
# pnpm (recommended)
pnpm install timezone-convert
// ESM
import { parseTzAuto } from 'timezone-convert'
const bucharestTz = parseTzAuto('Europe/Bucharest')
FAQs
Convert between timezone formats
We found that timezone-convert demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.
Security News
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.