* include/grub/datetime.h (grub_datetime2unixtime): Fix handling of days

after 29th of February.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-03-31 21:04:56 +02:00
parent d73ff15de4
commit 9576977eab
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-03-31 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/datetime.h (grub_datetime2unixtime): Fix handling of days
aftert 29th of February.
2012-03-31 Vladimir Serbinenko <phcoder@gmail.com>
Fix exfat endianness handling.

View file

@ -97,7 +97,7 @@ grub_datetime2unixtime (const struct grub_datetime *datetime, grub_int32_t *nix)
ret += ay * SECPERYEAR;
ret += monthssum[datetime->month - 1] * SECPERDAY;
if (ay == 0 && datetime->month >= 3)
if (ay == 3 && datetime->month >= 3)
ret += SECPERDAY;
ret += (datetime->day - 1) * SECPERDAY;