From: Vladimir 'phcoder' Serbinenko Date: Sat, 31 Mar 2012 19:04:56 +0000 (+0200) Subject: * include/grub/datetime.h (grub_datetime2unixtime): Fix handling of days X-Git-Tag: 2.00~348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9576977eabf0f066d20a4df07fbb786684ff4a2e;p=thirdparty%2Fgrub.git * include/grub/datetime.h (grub_datetime2unixtime): Fix handling of days after 29th of February. --- diff --git a/ChangeLog b/ChangeLog index 86e9e83c3..92ba6cee4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-31 Vladimir Serbinenko + + * include/grub/datetime.h (grub_datetime2unixtime): Fix handling of days + aftert 29th of February. + 2012-03-31 Vladimir Serbinenko Fix exfat endianness handling. diff --git a/include/grub/datetime.h b/include/grub/datetime.h index 4accd9cbd..3a3b3d0c3 100644 --- a/include/grub/datetime.h +++ b/include/grub/datetime.h @@ -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;