Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2804)

Unified Diff: ui/file_manager/zip_archiver/js/volume.js

Issue 2807063002: Replace Libarchive with MiniZip. (Closed)
Patch Set: Fix a few nits. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/zip_archiver/js/request.js ('k') | ui/file_manager/zip_archiver/module.nmf.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/zip_archiver/js/volume.js
diff --git a/ui/file_manager/zip_archiver/js/volume.js b/ui/file_manager/zip_archiver/js/volume.js
index 64fae35b99c899c0f811796be69d745fee9bc7bd..53b2922e323d1a37ca0cc21dd675c3a6cea300a3 100644
--- a/ui/file_manager/zip_archiver/js/volume.js
+++ b/ui/file_manager/zip_archiver/js/volume.js
@@ -6,11 +6,14 @@
/**
* Converts a c/c++ time_t variable to Date.
+ * The time we get from the archive is in local time.
* @param {number} timestamp A c/c++ time_t variable.
* @return {!Date}
*/
function DateFromTimeT(timestamp) {
- return new Date(1000 * timestamp);
+ var local = new Date(1000 * timestamp);
+ console.info(local.getHours())
+ return new Date( local.getTime() + (local.getTimezoneOffset() * 60000));
}
/**
« no previous file with comments | « ui/file_manager/zip_archiver/js/request.js ('k') | ui/file_manager/zip_archiver/module.nmf.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698