| 611 | } |
| 612 | |
| 613 | static void dos_time(timestamp_t *timestamp, int *dos_date, int *dos_time) |
| 614 | { |
| 615 | time_t time; |
| 616 | struct tm tm; |
| 617 | |
| 618 | if (date_overflows(*timestamp)) |
| 619 | die(_("timestamp too large for this system: %"PRItime), |
| 620 | *timestamp); |
| 621 | time = (time_t)*timestamp; |
| 622 | localtime_r(&time, &tm); |
| 623 | *timestamp = time; |
| 624 | |
| 625 | *dos_date = tm.tm_mday + (tm.tm_mon + 1) * 32 + |
| 626 | (tm.tm_year + 1900 - 1980) * 512; |
| 627 | *dos_time = tm.tm_sec / 2 + tm.tm_min * 32 + tm.tm_hour * 2048; |
| 628 | } |
| 629 | |
| 630 | static int archive_zip_config(const char *var, const char *value, |
| 631 | const struct config_context *ctx UNUSED, |
no test coverage detected