timezone-dst-info
Version:
Get current datetime, DST status, and UTC offset for a given timezone.
36 lines (23 loc) • 899 B
Markdown
# timezone-dst-info
> Get current date & time, DST (Daylight Saving Time) status, and UTC offset for any IANA timezone.
[](https://www.npmjs.com/package/timezone-dst-info)
[](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'
// }