Skip to content

Commit 41432a9

Browse files
author
leoding86
committed
fixed #260
1 parent b4de322 commit 41432a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/options_page/modules/DownloadTasks/MultiplePagesDownloadTask.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ class MultipleDownloadTask extends AbstractDownloadTask {
5050
constructor(options) {
5151
super();
5252

53+
this.now = new Date();
54+
this.now.setMinutes(this.now.getMinutes() - this.now.getTimezoneOffset());
5355
this.options = options;
5456
this.id = options.id;
5557
this.url = options.url;
@@ -146,10 +148,8 @@ class MultipleDownloadTask extends AbstractDownloadTask {
146148
});
147149

148150
if (this.shouldZipFile()) {
149-
const now = new Date();
150-
now.setMinutes(now.getMinutes() - now.getTimezoneOffset());
151151
const file = nameFormatter.format(this.options.renameImageRule, `p${pageNum}`) + `.${MimeType.getExtenstion(mimeType)}`;
152-
this.zip.file(fixFilename(file), blob, { date: now });
152+
this.zip.file(fixFilename(file), blob, { date: this.now });
153153
} else {
154154
let filename = GlobalSettings().downloadRelativeLocation;
155155

0 commit comments

Comments
 (0)