Skip to content

Commit 06fab95

Browse files
authored
test 4 timezone correction
should only correct for the difference between the new timezone and the original timezone
1 parent 4f0319b commit 06fab95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jqClock.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ if (!Number.prototype.map) {
145145
(function($, undefined) {
146146

147147
$.clock = {
148-
"version": "2.3.34",
148+
"version": "2.3.35",
149149
"options": [
150150
{
151151
"type": "string",
@@ -286,10 +286,10 @@ if (!Number.prototype.map) {
286286
var currentTzOffset = new Date().getTimezoneOffset();
287287
var correction = 0;
288288
if(currentTzOffset != myoptions.tzOffset){
289-
correction = (currentTzOffset*60*1000);
289+
correction = (currentTzOffset*60*1000) - (myoptions.tzOffset*60*1000);
290290
}
291291
//var mytimestamp = new Date().getTime() + myoptions.sysdiff;
292-
var mytimestamp = performance.timing.navigationStart + performance.now() + myoptions.sysdiff - correction;
292+
var mytimestamp = performance.timing.navigationStart + performance.now() + myoptions.sysdiff + correction;
293293

294294
var mytimestamp_sysdiff = new Date(mytimestamp);
295295
/*

0 commit comments

Comments
 (0)