Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.0.6 to 1.0.7

7

index.js

@@ -10,2 +10,5 @@ var assert = require('assert');

var weekDays = ['Sun', 'Mon','Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec'];
var HOUR = 60 * 60 * 1000;

@@ -168,2 +171,6 @@

MockDate.prototype.toDateString = function () {
return `${ weekDays[this.getDay()] } ${ months[this.getMonth()] } ${ this.getDate().toString().padStart(2, '0') } ${ this.getFullYear() }`;
};
// TODO:

@@ -170,0 +177,0 @@ // 'toDateString',

2

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

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

@@ -63,9 +63,11 @@ timezone-mock

* UTC
* Europe/London
I found that testing on these three were enough to ensure code worked in
all timezones (import factor is to test on a timezone with Daylight Saving
all timezones (important factor is to test on a timezone with Daylight Saving
Time if your local timezone does not). Brazil/East has the unique characteristic
of having the DST transition happen right at midnight, so code that sets a Date
object to midnight on a particular day and then does operations on that Date
object is especially vulnerable in that timezone.
object is especially vulnerable in that timezone. Europe/London is included as
a timezone that is a positive offset from UTC.

@@ -72,0 +74,0 @@ Status

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc