Skip to content

Original DateTime/DosTime value #855

Open

Description

@Elektrik1

Is your feature request related to a problem? Please describe.

I ran into an issue with with copying file from ZipInputStream to ZipOutputStream with preserving file Modification Time.
Date is being applied by simple assignment targetfile.DateTime = sourcefile.DateTime, but this date is off by two hours (in my case) from original datetime, because of this line in ZipEntry.cs (939):
DateTime = GetDateTime(extraData) ?? DateTime;
It overwrites correct DateTime read from DosTime by incorrect UnixData time, so original DateTime value is lost inside the library

Describe the solution you'd like

Expose original value in public property, so it would be possible to read out two dates - DateTime and Unix one gathered from ExtraData separately.

Describe alternatives you've considered

Unfortunately no alternatives has been found to skip ExtraData readout.

Tags

ZIP

Additional context

No response

Activity

  1. added
    enhancementFeature request or other improvements of existing functionality
    on Nov 20, 2023
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

    enhancementFeature request or other improvements of existing functionalityzipRelated to ZIP file format

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions