Skip to content

Commit

Permalink
vzic-output.c: properly handle rules such as Mar Fri>=26 which can re…
Browse files Browse the repository at this point in the history
…sult in Apr 1 (these currently only appear for Asia/Jerusalem and America/Toronto but are commented out and replaced with split rules)
  • Loading branch information
ksmurchison committed Nov 14, 2015
1 parent 9295b5f commit 97bb021
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/vzic/vzic-output.c
Expand Up @@ -1782,7 +1782,12 @@ calculate_actual_time (VzicTime *vzictime,

vzictime->day_code = DAY_SIMPLE;

if (vzictime->day_number <= 0 || vzictime->day_number > days_in_month) {
if (vzictime->day_number > days_in_month) {
vzictime->month++;
vzictime->day_number -= days_in_month;
}

if (vzictime->day_number <= 0) {
fprintf (stderr, "Day overflow: %i\n", vzictime->day_number);
exit (1);
}
Expand Down

0 comments on commit 97bb021

Please sign in to comment.