node-archiver icon indicating copy to clipboard operation
node-archiver copied to clipboard

How to set archiver file metadata with a desired date rather than using current date & time

Open bhaskerchari opened this issue 6 years ago • 3 comments

Hi there,

Is there a way or an api method available using which I may want to set/update my zip file meta info to use different creation/modifed date instead of it using the current datetime by default.

For some reason I want to generate a zip with a specific datetime and not to use the current timestamp. To keep it simple how can I update the zip file metainfo at the time of creation of a zip file using archiver?

Thanks in advance :)

bhaskerchari avatar Aug 23 '19 11:08 bhaskerchari

I have the same problem. And I need this to zip AWS lambda consistently. I do not want to redeploy lambda because of timestamps. In my case, It would be great to have zip's hash as a function of content, not timestamps.

redneckz avatar Aug 31 '20 19:08 redneckz

I use git manger zip file, don't want zip file change even through the source content don' change.

zsytssk avatar Dec 31 '21 01:12 zsytssk

Want to have the same datetime of original file, rather than change it to the datatime its zipped.

scruel avatar Mar 22 '22 08:03 scruel