mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 10:42:35 +02:00
Minor adjustments
Minor adjustments
This commit is contained in:
parent
a264fc358e
commit
1e51df0843
1 changed files with 5 additions and 3 deletions
|
@ -236,7 +236,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
hasScript: properties.script !== "",
|
||||
parentState: parentState,
|
||||
created: formatToStringDateTime(properties.created),
|
||||
lastEdited: formatToStringDateTime(properties.lastEdited),
|
||||
lastEdited: formatToStringDateTime(properties.lastEdited)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -259,14 +259,16 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
|||
function formatToStringDateTime(timestamp) {
|
||||
var d = new Date(Math.floor(timestamp/1000));
|
||||
var dateTime = d.getUTCFullYear() + "-" + zeroPad((d.getUTCMonth() + 1), 2) + "-" + zeroPad(d.getUTCDate(), 2);
|
||||
dateTime = dateTime + " " + zeroPad(d.getUTCHours(),2) + ":" + zeroPad(d.getUTCMinutes(), 2) + ":" + zeroPad(d.getUTCSeconds(), 2);
|
||||
dateTime = dateTime + " " + zeroPad(d.getUTCHours(), 2) + ":" + zeroPad(d.getUTCMinutes(), 2) + ":" + zeroPad(d.getUTCSeconds(), 2);
|
||||
dateTime = dateTime + "." + zeroPad(d.getUTCMilliseconds(), 3);
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
function zeroPad(num, size) {
|
||||
num = num.toString();
|
||||
while (num.length < size) num = "0" + num;
|
||||
while (num.length < size) {
|
||||
num = "0" + num;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue