🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

timezone-mock

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezone-mock - npm Package Compare versions

Comparing version

to
1.1.0

18

index.js

@@ -179,3 +179,19 @@ var assert = require('assert');

}
return 'Mockday ' + this.d.toISOString() + ' GMT-0' + this.calcTZO() + '00 (MockDate)';
var str = [this.d.toISOString() + ' UTC (MockDate: GMT'];
var tzo = -this.calcTZO();
if (tzo < 0) {
str.push('-');
tzo *= -1;
} else {
str.push('+');
}
str.push(Math.floor(tzo).toString().padStart(2, '0'));
tzo -= Math.floor(tzo);
if (tzo) {
str.push(tzo * 60);
} else {
str.push('00');
}
str.push(')');
return str.join('');
};

@@ -182,0 +198,0 @@

2

package.json
{
"name": "timezone-mock",
"version": "1.0.18",
"version": "1.1.0",
"description": "A JavaScript library to mock the local timezone.",

@@ -5,0 +5,0 @@ "main": "index.js",