From 47afa329023f75836c81b83aa7c43a11f88ff494 Mon Sep 17 00:00:00 2001 From: chylex <contact@chylex.com> Date: Mon, 13 Mar 2017 22:55:35 +0100 Subject: [PATCH] Minor code tweak in update.js to avoid a redeclaration --- Resources/Scripts/update.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Scripts/update.js b/Resources/Scripts/update.js index 141fbce0..e6bdfe5d 100644 --- a/Resources/Scripts/update.js +++ b/Resources/Scripts/update.js @@ -137,11 +137,11 @@ }; // - // Function: Returns milliseconds until the start of the next hour, with an offset in seconds that can skip an hour if the clock would roll over too soon. + // Function: Returns milliseconds until the start of the next hour, with an extra offset in seconds that can skip an hour if the clock would roll over too soon. // - var getTimeUntilNextHour = function(offset){ + var getTimeUntilNextHour = function(extra){ var now = new Date(); - var offset = new Date(+now+offset*1000); + var offset = new Date(+now+extra*1000); return new Date(offset.getFullYear(), offset.getMonth(), offset.getDate(), offset.getHours()+1, 0, 0)-now; };