UNPKG

timezone-dst-info

Version:

Get current datetime, DST status, and UTC offset for a given timezone.

36 lines (23 loc) 899 B
# timezone-dst-info > Get current date & time, DST (Daylight Saving Time) status, and UTC offset for any IANA timezone. [![NPM Version](https://img.shields.io/npm/v/timezone-dst-info.svg)](https://www.npmjs.com/package/timezone-dst-info) [![License](https://img.shields.io/npm/l/timezone-dst-info.svg)](LICENSE) --- ## ✨ Features - Returns ISO-formatted datetime for any timezone - Detects if DST (Daylight Saving Time) is active - Returns the UTC offset abbreviation (e.g., PST, PDT, IST) - Works as a CLI tool or programmatically in Node.js --- ## 📦 Installation ```bash npm install timezone-dst-info const { getTimezoneInfo } = require("timezone-dst-info"); const info = getTimezoneInfo("America/New_York"); console.log(info); // Example output: // { // dateTime: '2025-05-24T14:00:00.000-04:00', // isDST: true, // offsetUTC: 'EDT' // }