diff options
| author | intrigeri | 2015-08-01 09:32:26 +0000 |
|---|---|---|
| committer | intrigeri | 2015-08-01 09:48:05 +0000 |
| commit | 6b3043af69eb5d102ed358866a41204cc62bba4c (patch) | |
| tree | fff0b336ead90174ec98779e8197d72dc2b4f1d1 /libmat | |
| parent | d397ab99d1da7eba5db2dc14c68dec9bcd479b8d (diff) | |
archive: use correct epoch time.
epoch is 1970-01-01 00:00:00 UTC, not 1970-01-01 01:00:00 UTC.
This mistake was introduced in commit ef5a32c to fix the test suite. I guess
that it was a hack that workaround'ed an actual bug for a specific timezone
only. If that bug reappears, we'll have to fix that by making this module
timezone-aware, not by setting a wrong epoch value.
Diffstat (limited to 'libmat')
| -rw-r--r-- | libmat/archive.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmat/archive.py b/libmat/archive.py index 4c62dc8..c70759a 100644 --- a/libmat/archive.py +++ b/libmat/archive.py | |||
| @@ -16,7 +16,7 @@ import parser | |||
| 16 | # Zip files do not support dates older than 01/01/1980 | 16 | # Zip files do not support dates older than 01/01/1980 |
| 17 | ZIP_EPOCH = (1980, 1, 1, 0, 0, 0) | 17 | ZIP_EPOCH = (1980, 1, 1, 0, 0, 0) |
| 18 | ZIP_EPOCH_SECONDS = (datetime.datetime(1980, 1, 1, 0, 0, 0) | 18 | ZIP_EPOCH_SECONDS = (datetime.datetime(1980, 1, 1, 0, 0, 0) |
| 19 | - datetime.datetime(1970, 1, 1, 1, 0, 0)).total_seconds() | 19 | - datetime.datetime(1970, 1, 1, 0, 0, 0)).total_seconds() |
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | class GenericArchiveStripper(parser.GenericParser): | 22 | class GenericArchiveStripper(parser.GenericParser): |
