Skip to content

Commit

Permalink
Fix #6 about files timezone.
Browse files Browse the repository at this point in the history
  • Loading branch information
KinoLien committed Feb 6, 2020
1 parent 2fe9cbc commit 95e7509
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion js/content/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ function getGitUrl(author, project, type, sha){

var zipContents = function(filename, contents){
var zip = new JSZip();
var currDate = new Date();
var dateWithOffset = new Date(currDate.getTime() - currDate.getTimezoneOffset() * 60000);

contents.forEach(function(item){
zip.file(item.path, item.content, {createFolders:true,base64:true});
zip.file(item.path, item.content, { createFolders:true, base64:true, date: dateWithOffset });
});
return new Promise(function(res, rej){
zip.generateAsync({type:"blob"})
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "GitZip",
"description": "It can make the sub-directories and files of github repository as zip and download it",
"version": "0.2.3",
"version": "0.2.5",

"page_action": {
"default_icon": "images/icon-empty.png",
Expand Down

0 comments on commit 95e7509

Please sign in to comment.