Skip to content

archive/zip: FileHeader.FileInfo().ModTime() should use Modified #28350

Description

@Xjs

Since Go 1.10, archive/zip.FileHeader contains a Modified field supporting extended timestamps. However, FileHeader.FileInfo() returns a os.FileInfo implementation whose ModTime() method still returns the legacy mod time. This should be changed to return Modified. A hint documenting that FileInfo() uses legacy fields would be nice for the time being.

As far as I can tell, headerFileInfo has direct access to the Modified field. Is there a reason why it wasn't included that I am missing, or was it just an oversight?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions