TARUNTEjjjj commented on code in PR #21832:
URL: https://github.com/apache/echarts/pull/21832#discussion_r4604451739
##########
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:
Could this reset all clock fields (`0, 0, 0, 0`) rather than only the hour?
A midnight transition can leave a nonzero minute, which this setter preserves
on subsequent days. With `TZ=Asia/Kathmandu`, a time axis spanning local
1985-12-28 12:00 through 1986-01-05 00:00 produces Jan 1 at 00:15 (correct for
that transition), but Jan 2–4 also remain at 00:15; the Jan 5 midnight tick is
omitted because the drifting tick exceeds the extent. Those later midnights
exist and should be at 00:00.
I reproduced this through `createChart`/`setOption` and
`axis.getViewLabels()` on the current head. The existing Azores regression
passes; an additional Kathmandu assertion fails with expected minute 0,
received 15. This is a remaining case in the fix, not a claim that the PR
introduced the drift. Clearing minutes, seconds and milliseconds alongside
hours should cover non-hour offset changes too.
Validation used Node 26.13.0 and the repository's Jest/jsdom environment.
AI-assisted review and local validation with OpenAI Codex.
--
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]