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

Unified Diff: chrome/browser/resources/chromeos/drive_internals.js

Issue 10852014: Drive: Show localtime instead of UTC at "last modified" field of GCache in drive-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/drive_internals.js
diff --git a/chrome/browser/resources/chromeos/drive_internals.js b/chrome/browser/resources/chromeos/drive_internals.js
index bdd522f7a261b90f10d11de576081e3b4b140f39..4548e2a187f22ee29ef2ece0544f2065aa7dbb46 100644
--- a/chrome/browser/resources/chromeos/drive_internals.js
+++ b/chrome/browser/resources/chromeos/drive_internals.js
@@ -29,9 +29,15 @@ function updateGCacheContents(gcacheContents) {
else if (entry.is_symbolic_link)
path += '@';
+ // Try to parse ISO8601-formated date and stringify to localized format.
+ var last_modified = new Date(entry.last_modified);
+ var last_modified_str =
+ (last_modified && !isNaN(last_modified)) ? last_modified.ToString() :
+ '[' + last_modified + ']';
satorux1 2012/08/03 23:06:28 Can we instead pass the local time from C++ side?
+
tr.appendChild(createElementFromText('td', path));
tr.appendChild(createElementFromText('td', entry.size));
- tr.appendChild(createElementFromText('td', entry.last_modified));
+ tr.appendChild(createElementFromText('td', last_modified_str));
tbody.appendChild(tr);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698