Skip to content

Entry header time setter requires Date since v0.5.15 #539

@thomasheritage

Description

@thomasheritage

Prior to v0.5.15, something like this would work:

zip.getEntries()[0].header.time = "2024-01-01"

Since v0.5.15 this code gives:

Uncaught TypeError: val.getFullYear is not a function
    at Utils.fromDate2DOS (node_modules/adm-zip/util/utils.js:328:13)
    at set time [as time] (node_modules/adm-zip/headers/entryHeader.js:101:34)

I believe this is because the setter for time now requires a Date object. Is this intentional? This breaks some existing code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions