Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
timestamp-zoned
Advanced tools
The standard JS APIs for dates don't necessarily include the current timezone, because it's all open. This uses the current timezone information to make sure you get the zone information you need.
The result is an ISO 8601 time, which always parses to be the same as the current time.
You can also add a {zone: true}
option to get an added, browser-derived
location zone name, if one is available. This, obviously, is no longer
ISO 8601 so simply trim after the first space if you need to.
var times = require('timestamp-zoned');
times.getTimestamp();
//=> '2018-08-28T15:04:25.247-04:00'
times.getTimestamp({zone: true});
//=> '2018-08-28T15:04:50.009-04:00 (America/Toronto)'
Copyright © 2018, Stuart Watt. Released under the MIT License.
Version 1.0.2 -- 11th June 2019
FAQs
A small module that generates an ISO 8601 timestamp including a zone
The npm package timestamp-zoned receives a total of 1 weekly downloads. As such, timestamp-zoned popularity was classified as not popular.
We found that timestamp-zoned 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.