Skip to content

Last Modified time for zip entries is UTC time #369

Open
@d3chapma

Description

@d3chapma

I'm in a -4:00 timezone. When I create an archive then extract it, the extracted files have a correct created time, but their last modified times are created time + 4 hours.

If I modify the jszip source to the following, the created and last modified times are the same, which is what I would expect:

    dosTime = date.getHours();
    dosTime = dosTime << 6;
    dosTime = dosTime | date.getMinutes();
    dosTime = dosTime << 5;
    dosTime = dosTime | date.getSeconds() / 2;

    dosDate = date.getUTCFullYear() - 1980;
    dosDate = dosDate << 4;
    dosDate = dosDate | (date.getUTCMonth() + 1);
    dosDate = dosDate << 5;
    dosDate = dosDate | date.getUTCDate();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions