schizophrenicmaniac commented on code in PR #21832:
URL: https://github.com/apache/echarts/pull/21832#discussion_r4616135905
##########
src/scale/Time.ts:
##########
@@ -508,6 +508,16 @@ function createIntervalTicks(
// d -= 1; // Starts with 0; PENDING
// }
+ function stepDate(step: number): number {
+ date[setMethodName](date[getMethodName]() + step);
+ if (isDate) {
+ // If local midnight does not exist on a day (DST change), the
date is moved to
+ // 01:00 and would stay at 01:00 in the following days. So
reset to the start of day.
+ date[hoursSetterName(isUTC)](0);
Review Comment:
Good catch, thanks. It now uses setHours(0, 0, 0, 0) (or setUTCHours), so
minutes, seconds and milliseconds are reset too. I added your Kathmandu case to
the test: Jan 1 is at 00:15, Jan 2 to 5 are back at 00:00, and the Jan 5 tick
is there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]