* other sub time units are already reset in find_next().
*/
int cmp;
- if ((cmp = CMP(t.tm_year, tm->tm_year)) != 0)
+ if ((cmp = CMP(t.tm_year, tm->tm_year)) != 0) {
t.tm_mon = 0;
- else if ((cmp = CMP(t.tm_mon, tm->tm_mon)) != 0)
+ t.tm_mday = 1;
+ } else if ((cmp = CMP(t.tm_mon, tm->tm_mon)) != 0)
t.tm_mday = 1;
else if ((cmp = CMP(t.tm_mday, tm->tm_mday)) != 0)
t.tm_hour = 0;
test_next("Sun *-*-* 01:00:00 Europe/Dublin", "IST", 1616412478000000, 1617494400000000);
/* Europe/Dublin TZ that moves DST backwards */
test_next("hourly", "IST-1GMT-0,M10.5.0/1,M3.5.0/1", 1743292800000000, 1743296400000000);
+ /* Check when the year changes, see issue #40260 */
+ test_next("*-*-1/11 23:00:00 UTC", "", 1763938800000000, 1764630000000000);
}
TEST(calendar_spec_from_string) {