Fix 1-1 in daysSince2000

This commit is contained in:
Tim Mickel 2016-10-26 10:26:03 -04:00 committed by GitHub
parent 5103cfb853
commit 28a0831e8d

View file

@ -117,7 +117,7 @@ Scratch3SensingBlocks.prototype.getKeyPressed = function (args, util) {
Scratch3SensingBlocks.prototype.daysSince2000 = function () { Scratch3SensingBlocks.prototype.daysSince2000 = function () {
var msPerDay = 24 * 60 * 60 * 1000; var msPerDay = 24 * 60 * 60 * 1000;
var start = new Date(2000, 1 - 1, 1); var start = new Date(2000, 0, 1); // Months are 0-indexed.
var today = new Date(); var today = new Date();
var dstAdjust = today.getTimezoneOffset() - start.getTimezoneOffset(); var dstAdjust = today.getTimezoneOffset() - start.getTimezoneOffset();
var mSecsSinceStart = today.valueOf() - start.valueOf(); var mSecsSinceStart = today.valueOf() - start.valueOf();