
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
timezone-conversions
Advanced tools
© Aman latkar amanlatkar1630@gmail.com
Functionality
Convert datetime from one timezone to another
Get Current datetime of any timezone
npm install timezone-conversions
const { Convert_TZ, CurrentDateTime } = require("timezone-conversions");
// Convert datetime from one time timezone to another
Convert_TZ("YYYY-MM-DD HH:mm:ss", from_timezone, to_timezone);
// Convert_TZ("2021-03-19 10:15:00", "+05:30", "+07:00"); => 2021-03-19 12:45:00 +07:30
// Get Current datetime of any timezone
CurrentDateTime(timezone);
// CurrentDateTime("+05:30"); => 2021-03-20 02:12:00 +05:30
Check supported timezones https://en.wikipedia.org/wiki/List_of_time_zones_by_country
Supported DateTime formats for timezone conversions
Format | Example |
---|---|
YYYY-MM-DDTHH:mm:ss | 2021-03-19T10:15:00 |
YYYY-MM-DD HH:mm:ss | 2021-03-19 10:15:00 |
YYYY-MM-DD HH:mm:ss A | 2021-03-19 10:15:00 AM |
YYYY-MM-DD HH:mm:ss:SSS | 2021-03-19 10:15:00:000 |
YYYY-MM-DD HH:mm | 2021-03-19 10:15 |
FAQs
Convert datetime from one timezone to another
We found that timezone-conversions 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.