FS#12854 - ipod-time-sync sets wrong day
Change-Id: I8ac7561119e51774b9aee377e7373a7e830a5780
This commit is contained in:
parent
a7dee7f447
commit
01d0de9fc4
1 changed files with 1 additions and 1 deletions
|
@ -336,7 +336,7 @@ static void yearday_to_daymonth(int yd, int y, int *d, int *m)
|
|||
static char t[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
|
||||
|
||||
bool leap = (y%4 == 0 && y%100 != 0) || y%400 == 0;
|
||||
t[2] = leap ? 29 : 28;
|
||||
t[1] = leap ? 29 : 28;
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 12 && yd >= t[i]; i++)
|
||||
|
|
Loading…
Reference in a new issue