Skip to content

Support parameter to correctly date files when expanding an archive #133

Open
@ayousuf23

Description

@ayousuf23

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 to Expand-Archive. When expanding an archive, the dates for each expanded file and directory are adjusted based on the specified timezone.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions