@@ -1784,14 +1784,14 @@ def test_writestr_extended_local_header_issue1202(self):
17841784 def test_write_with_source_date_epoch (self ):
17851785 with os_helper .EnvironmentVarGuard () as env :
17861786 # Set the SOURCE_DATE_EPOCH environment variable to a specific timestamp
1787- env ['SOURCE_DATE_EPOCH' ] = "1727440508 "
1787+ env ['SOURCE_DATE_EPOCH' ] = "1735715999 "
17881788
17891789 with zipfile .ZipFile (TESTFN , "w" ) as zf :
17901790 zf .writestr ("test_source_date_epoch.txt" , "Testing SOURCE_DATE_EPOCH" )
17911791
17921792 with zipfile .ZipFile (TESTFN , "r" ) as zf :
17931793 zip_info = zf .getinfo ("test_source_date_epoch.txt" )
1794- get_time = time .gmtime (int (os .environ ['SOURCE_DATE_EPOCH' ]))[:6 ]
1794+ get_time = time .localtime (int (os .environ ['SOURCE_DATE_EPOCH' ]))[:6 ]
17951795 # Compare each element of the date_time tuple
17961796 # Allow for a 1-second difference
17971797 for z_time , g_time in zip (zip_info .date_time , get_time ):
@@ -1806,7 +1806,7 @@ def test_write_without_source_date_epoch(self):
18061806
18071807 with zipfile .ZipFile (TESTFN , "r" ) as zf :
18081808 zip_info = zf .getinfo ("test_no_source_date_epoch.txt" )
1809- current_time = time .gmtime ()[:6 ]
1809+ current_time = time .localtime ()[:6 ]
18101810 for z_time , c_time in zip (zip_info .date_time , current_time ):
18111811 self .assertAlmostEqual (z_time , c_time , delta = 1 )
18121812
0 commit comments