Displays save game timestamps in local time rather than UTC, patch by Deiz/F00. Fixes #1530

This was SVN commit r12122.
This commit is contained in:
historic_bruno 2012-07-16 03:55:40 +00:00
parent 743f60b920
commit 3a85fb7c48

View File

@ -11,9 +11,9 @@ function twoDigits(n)
function generateLabel(metadata)
{
var t = new Date(metadata.time*1000);
// TODO: timezones
var date = t.getUTCFullYear()+"-"+twoDigits(1+t.getUTCMonth())+"-"+twoDigits(t.getUTCDate());
var time = twoDigits(t.getUTCHours())+":"+twoDigits(t.getUTCMinutes())+":"+twoDigits(t.getUTCSeconds());
var date = t.getFullYear()+"-"+twoDigits(1+t.getMonth())+"-"+twoDigits(t.getDate());
var time = twoDigits(t.getHours())+":"+twoDigits(t.getMinutes())+":"+twoDigits(t.getSeconds());
return "["+date+" "+time+"] "+metadata.initAttributes.map;
}