You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
There is a design flaw with Zip which goes back to its origins on MS DOS. It stores the date/time as displayed - i.e. as local time, not UTC time. And when the file is extracted, the time is set as local time. This means if compress and expand happen on machines with different time zone settings the time stamp on the files changes. Changing the file format to fix this is absolutely out of scope, however a -SourceTimeZone parameter could allow the unzip operation to create correctly dated files.
An optional named parameter -SourceTimeZone which takes in a timezone is added to Expand-Archive. When expanding an archive, the dates for each expanded file and directory are adjusted based on the specified timezone.
The text was updated successfully, but these errors were encountered:
Summary of the new feature / enhancement
There is a design flaw with Zip which goes back to its origins on MS DOS. It stores the date/time as displayed - i.e. as local time, not UTC time. And when the file is extracted, the time is set as local time. This means if compress and expand happen on machines with different time zone settings the time stamp on the files changes. Changing the file format to fix this is absolutely out of scope, however a
-SourceTimeZone
parameter could allow the unzip operation to create correctly dated files.Taken from @jhoneill
Proposed technical implementation details (optional)
An optional named parameter
-SourceTimeZone
which takes in a timezone is added toExpand-Archive
. When expanding an archive, the dates for each expanded file and directory are adjusted based on the specified timezone.The text was updated successfully, but these errors were encountered: