We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dca5c1 commit f7de1c4Copy full SHA for f7de1c4
generic/tclClock.c
@@ -4441,7 +4441,11 @@ ClockAddObjCmd(
4441
}
4442
4443
/* time together as seconds of the day */
4444
- yySecondOfDay = yySeconds = yydate.localSeconds % SECONDS_PER_DAY;
+ yySecondOfDay = yydate.localSeconds % SECONDS_PER_DAY;
4445
+ if (yySecondOfDay < 0) { /* to positive result of mod */
4446
+ yySecondOfDay += SECONDS_PER_DAY;
4447
+ }
4448
+ yySeconds = yySecondOfDay;
4449
/* seconds are in localSeconds (relative base date), so reset time here */
4450
yyHour = 0; yyMinutes = 0; yyMeridian = MER24;
4451
0 commit comments