Skip to content

Commit d9824ce

Browse files
committed
Fix timezone related timestamp issue
1 parent 4b2176e commit d9824ce

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_zipfile/test_core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ def test_repack_file_entry_before_first_file(self):
18581858
with zipfile.ZipFile(TESTFN) as zh:
18591859
self.assertIsNone(zh.testzip())
18601860

1861-
@mock.patch.object(time, 'time', new=lambda: 315504000) # fix time for ZipFile.writestr()
1861+
@mock.patch.object(time, 'time', new=lambda: 315590400) # fix time for ZipFile.writestr()
18621862
def test_repack_bytes_before_removed_files(self):
18631863
"""Should preserve if there are bytes before stale local file entries."""
18641864
for ii in ([1], [1, 2], [2]):
@@ -1902,7 +1902,7 @@ def test_repack_bytes_before_removed_files(self):
19021902
with zipfile.ZipFile(TESTFN) as zh:
19031903
self.assertIsNone(zh.testzip())
19041904

1905-
@mock.patch.object(time, 'time', new=lambda: 315504000) # fix time for ZipFile.writestr()
1905+
@mock.patch.object(time, 'time', new=lambda: 315590400) # fix time for ZipFile.writestr()
19061906
def test_repack_bytes_after_removed_files(self):
19071907
"""Should keep extra bytes if there are bytes after stale local file entries."""
19081908
for ii in ([1], [1, 2], [2]):
@@ -1945,7 +1945,7 @@ def test_repack_bytes_after_removed_files(self):
19451945
with zipfile.ZipFile(TESTFN) as zh:
19461946
self.assertIsNone(zh.testzip())
19471947

1948-
@mock.patch.object(time, 'time', new=lambda: 315504000) # fix time for ZipFile.writestr()
1948+
@mock.patch.object(time, 'time', new=lambda: 315590400) # fix time for ZipFile.writestr()
19491949
def test_repack_bytes_between_removed_files(self):
19501950
"""Should strip only local file entries before random bytes."""
19511951
# calculate the expected results
@@ -2103,7 +2103,7 @@ def test_repack_removed_partial(self):
21032103
with zipfile.ZipFile(TESTFN) as zh:
21042104
self.assertIsNone(zh.testzip())
21052105

2106-
@mock.patch.object(time, 'time', new=lambda: 315504000) # fix time for ZipFile.writestr()
2106+
@mock.patch.object(time, 'time', new=lambda: 315590400) # fix time for ZipFile.writestr()
21072107
def test_repack_removed_bytes_between_files(self):
21082108
"""Should not remove bytes between local file entries."""
21092109
for ii in ([0], [1], [2]):

0 commit comments

Comments
 (0)