Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Original DateTime/DosTime value #855

Open
Elektrik1 opened this issue Nov 20, 2023 · 0 comments
Open

Original DateTime/DosTime value #855

Elektrik1 opened this issue Nov 20, 2023 · 0 comments
Labels
enhancement Feature request or other improvements of existing functionality zip Related to ZIP file format

Comments

@Elektrik1
Copy link

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

@Elektrik1 Elektrik1 added the enhancement Feature request or other improvements of existing functionality label Nov 20, 2023
@github-actions github-actions bot added the zip Related to ZIP file format label Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or other improvements of existing functionality zip Related to ZIP file format
Projects
None yet
Development

No branches or pull requests

1 participant