Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

zipfile: docs should document whatZipInfo.date_time actually is #133125

Open
Labels
3.13bugs and security fixes3.14bugs and security fixesdocsDocumentation in the Doc dirstdlibPython modules in the Lib dir
@calestyo

Description

@calestyo

Documentation

Currently, thedocumentation forZipInfo.date_time is:

The time and date of the last modification to the archive member. This is a tuple of six values:
...
Note: The ZIP file format does not support timestamps before 1980.

This should be extended/clarified to definewhich date/time is meant (which currently is only hinted by thedoes not support timestamps before 1980.

The ZIP format supports for multiple timestamps:

  • there's thelast mod file time andlast mod file date in the central directory (see chapters 4.3.7 and 4.4.6)
  • but also various times (e.g. for NTFS and UNIX) as part of theextra fields (see e.g. chapter 4.5.7).

The latter may e.g. support times before 1980, higher resolutions and time zones.

Right now it seems not strictly definedwhat.date_time actually returns - from what I can see from the code, it's the one from the central directory - but that could in principle be just an implementation detail and a future version ofzipfile could e.g. use the extra fields if present.

Thus it would be nice, if the documentation could specify, whether.date_time is always meant to be the time from the central directory, or whether this could change.

Thanks,
Chris.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesdocsDocumentation in the Doc dirstdlibPython modules in the Lib dir

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp