File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -830,7 +830,10 @@ Instances have the following methods and attributes:
830
830
.. attribute :: ZipInfo.date_time
831
831
832
832
The time and date of the last modification to the archive member. This is a
833
- tuple of six values:
833
+ tuple of six values representing the "last [modified] file time" and "last [modified] file date"
834
+ fields from the ZIP file's central directory.
835
+
836
+ The tuple contains:
834
837
835
838
+-------+--------------------------+
836
839
| Index | Value |
@@ -850,7 +853,15 @@ Instances have the following methods and attributes:
850
853
851
854
.. note ::
852
855
853
- The ZIP file format does not support timestamps before 1980.
856
+ The ZIP format supports multiple timestamp fields in different locations
857
+ (central directory, extra fields for NTFS/UNIX systems, etc.). This attribute
858
+ specifically returns the timestamp from the central directory. The central
859
+ directory timestamp format in ZIP files does not support timestamps before
860
+ 1980. While some extra field formats (such as UNIX timestamps) can represent
861
+ earlier dates, this attribute only returns the central directory timestamp.
862
+
863
+ The central directory timestamp is interpreted as representing local
864
+ time, rather than UTC time, to match the behavior of other zip tools.
854
865
855
866
856
867
.. attribute :: ZipInfo.compress_type
You can’t perform that action at this time.
0 commit comments