diff --git a/pkg/private/zip/build_zip.py b/pkg/private/zip/build_zip.py
index 5a191b7a..c2ff3644 100644
--- a/pkg/private/zip/build_zip.py
+++ b/pkg/private/zip/build_zip.py
@@ -74,7 +74,7 @@ def _combine_paths(left, right):
 
 
 def parse_date(ts):
-  ts = datetime.datetime.utcfromtimestamp(ts)
+  ts = datetime.datetime.fromtimestamp(ts, tz=datetime.timezone.utc)
   return (ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second)
 
 
diff --git a/tests/zip/zip_test_lib.py b/tests/zip/zip_test_lib.py
index ebb0b603..e6c305f9 100644
--- a/tests/zip/zip_test_lib.py
+++ b/tests/zip/zip_test_lib.py
@@ -31,7 +31,7 @@
 _ZIP_EPOCH_S = int(_ZIP_EPOCH_DT.timestamp())
 
 def seconds_to_ziptime(s):
-  dt = datetime.datetime.utcfromtimestamp(s)
+  dt = datetime.datetime.fromtimestamp(s, tz=datetime.timezone.utc)
   return (dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second)