'Technische' datums altijd via toISODateTimeString, zonder tijdzone gedoe

svn path=/Website/trunk/; revision=33050
This commit is contained in:
Jos Groot Lipman
2017-03-06 14:29:44 +00:00
parent ee2819a9a1
commit dec61e4045
2 changed files with 7 additions and 1 deletions

View File

@@ -443,7 +443,7 @@ FCLTHeader =
var tinc = new Date(hinc.DateLastModified); var tinc = new Date(hinc.DateLastModified);
if (tcsx > tcss || tinc > tcss) if (tcsx > tcss || tinc > tcss)
{ {
__Log("{0} is older ({1}) than default.csx ({2}), refreshing it.".format(this._templateCss, toDateTimeString(tcss, true), toDateTimeString(tcsx, true))); __Log("{0} is older ({1}) than default.csx ({2}), refreshing it.".format(this._templateCss, toISODateTimeString(tcss, true), toISODateTimeString(tcsx, true)));
this.generateTemplateCss(); this.generateTemplateCss();
} }
} }

View File

@@ -426,6 +426,12 @@ function toISODateString(jsDate)
function toISODateTimeString(jsDate) function toISODateTimeString(jsDate)
{ {
if (typeof jsDate == "object" && jsDate.type == 135/*adDBTimeStamp, oRs("datum")*/)
jsDate = new Date(jsDate.value);
if (typeof jsDate == "date") // een oRs("datum").value
jsDate = new Date(jsDate);
return toISODateString(jsDate) + " " return toISODateString(jsDate) + " "
+ padout(jsDate.getHours()) + ":" + padout(jsDate.getMinutes()) + ":" + padout(jsDate.getSeconds()); + padout(jsDate.getHours()) + ":" + padout(jsDate.getMinutes()) + ":" + padout(jsDate.getSeconds());
} }