Skip to content

Commit c3b0cd6

Browse files
committed
try the prior tick first
1 parent d14838b commit c3b0cd6

File tree

5 files changed

+9
-13
lines changed

5 files changed

+9
-13
lines changed

dist/uPlot.cjs.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,8 +1444,8 @@ function genTimeStuffs(ms) {
14441444
// adjust for DST misses
14451445
let hour = date.getHours();
14461446
if (hour % incrHours > 0) {
1447-
let hour2 = tzDate(split + h).getHours();
1448-
split += hour2 % incrHours == 0 ? h : -h;
1447+
let hour2 = tzDate(split - h).getHours();
1448+
split += hour2 % incrHours == 0 ? -h : h;
14491449
}
14501450

14511451
if (split > scaleMax)
@@ -1455,7 +1455,6 @@ function genTimeStuffs(ms) {
14551455
splits.push(split);
14561456

14571457
split += foundIncr;
1458-
// expect = (expect + incrHours) % 24;
14591458
} while (1);
14601459
}
14611460
else {

dist/uPlot.esm.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,8 +1442,8 @@ function genTimeStuffs(ms) {
14421442
// adjust for DST misses
14431443
let hour = date.getHours();
14441444
if (hour % incrHours > 0) {
1445-
let hour2 = tzDate(split + h).getHours();
1446-
split += hour2 % incrHours == 0 ? h : -h;
1445+
let hour2 = tzDate(split - h).getHours();
1446+
split += hour2 % incrHours == 0 ? -h : h;
14471447
}
14481448

14491449
if (split > scaleMax)
@@ -1453,7 +1453,6 @@ function genTimeStuffs(ms) {
14531453
splits.push(split);
14541454

14551455
split += foundIncr;
1456-
// expect = (expect + incrHours) % 24;
14571456
} while (1);
14581457
}
14591458
else {

dist/uPlot.iife.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,8 +1445,8 @@ var uPlot = (function () {
14451445
// adjust for DST misses
14461446
let hour = date.getHours();
14471447
if (hour % incrHours > 0) {
1448-
let hour2 = tzDate(split + h).getHours();
1449-
split += hour2 % incrHours == 0 ? h : -h;
1448+
let hour2 = tzDate(split - h).getHours();
1449+
split += hour2 % incrHours == 0 ? -h : h;
14501450
}
14511451

14521452
if (split > scaleMax)
@@ -1456,7 +1456,6 @@ var uPlot = (function () {
14561456
splits.push(split);
14571457

14581458
split += foundIncr;
1459-
// expect = (expect + incrHours) % 24;
14601459
} while (1);
14611460
}
14621461
else {

dist/uPlot.iife.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/opts.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ function genTimeStuffs(ms) {
255255
// adjust for DST misses
256256
let hour = date.getHours();
257257
if (hour % incrHours > 0) {
258-
let hour2 = tzDate(split + h).getHours();
259-
split += hour2 % incrHours == 0 ? h : -h;
258+
let hour2 = tzDate(split - h).getHours();
259+
split += hour2 % incrHours == 0 ? -h : h;
260260
}
261261

262262
if (split > scaleMax)
@@ -266,7 +266,6 @@ function genTimeStuffs(ms) {
266266
splits.push(split);
267267

268268
split += foundIncr;
269-
// expect = (expect + incrHours) % 24;
270269
} while (1);
271270
}
272271
else {

0 commit comments

Comments
 (0)