New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

ts2d

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts2d

Convert timestamp to date

latest
npmnpm
Version
1.0.2
Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

ts2d

Convert timestamp to date.

Usage

npx ts2d 1669611660000
# => 2022/11/28 13:01:00 +0800

# Get current date time (no argument)
npx ts2d

Environment Variables

  • TZ or TIMEZONE: Set timezone (default: auto-detected local timezone)
  • DATE_FORMAT: Set output format (default: YYYY/MM/DD HH:mm:ss ZZ)

Examples

TZ=America/New_York npx ts2d 1669611660000
# => 2022/11/28 00:01:00 -0500

DATE_FORMAT='YYYYMMDD_HHmmss' npx ts2d 1669611660000
# => 20221128_130100

License

MIT

Keywords

timestamp

FAQs

Package last updated on 04 Feb 2026

Related posts