Comparing version 2.0.1 to 2.0.2
@@ -32,7 +32,11 @@ /** | ||
/** | ||
* Returns current timezone date in ISO format | ||
* @returns {String} | ||
*/ | ||
function createDatePart() { | ||
return new Date().toISOString(); | ||
var timeZoneOffset = new Date().getTimezoneOffset() * 60000; // offset in milliseconds | ||
var dateWithReversedOffset = new Date(Date.now() - timeZoneOffset); | ||
return dateWithReversedOffset.toISOString().slice(0, -1); // remove Zulu timezone abbreviation | ||
} | ||
module.exports = exports["default"]; |
{ | ||
"name": "lggr", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -21,6 +21,10 @@ /** | ||
/** | ||
* Returns current timezone date in ISO format | ||
* @returns {String} | ||
*/ | ||
function createDatePart() { | ||
return new Date().toISOString(); | ||
const timeZoneOffset = (new Date()).getTimezoneOffset() * 60000; // offset in milliseconds | ||
const dateWithReversedOffset = new Date(Date.now() - timeZoneOffset); | ||
return dateWithReversedOffset.toISOString().slice(0, -1); // remove Zulu timezone abbreviation | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
86083
2316
0