Skip to content

Commit

Permalink
fix incorrect date
Browse files Browse the repository at this point in the history
  • Loading branch information
Coeur committed Nov 10, 2024
1 parent 2c51fa7 commit 0dfca3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mz_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,7 @@ static void mz_zip_dosdate_to_raw_tm(uint64_t dos_date, struct tm *ptm) {
uint64_t date = (uint64_t)(dos_date >> 16);

ptm->tm_mday = (uint16_t)(date & 0x1f);
ptm->tm_mon = (uint16_t)(((date & 0x1E0) / 0x20) - 1);
ptm->tm_mon = (uint16_t)((date & 0x1E0) / 0x20) - 1;
ptm->tm_year = (uint16_t)(((date & 0x0FE00) / 0x0200) + 80);
ptm->tm_hour = (uint16_t)((dos_date & 0xF800) / 0x800);
ptm->tm_min = (uint16_t)((dos_date & 0x7E0) / 0x20);
Expand Down

0 comments on commit 0dfca3d

Please sign in to comment.