days are now calculated according to specified site-timezone by using global formatTimestamp()

This commit is contained in:
Robert Gaggl 2002-10-31 21:12:28 +00:00
parent f1b713b344
commit 44369d2c33
2 changed files with 6 additions and 3 deletions

View file

@ -49,7 +49,8 @@ function evalStory(param,modifier) {
result = getError("timestampParse",param.createtime);
else if (ctime.value != this.createtime) {
this.createtime = ctime.value;
this.day = this.createtime.format("yyyyMMdd");
// create day of story with respect to site-timezone
this.day = formatTimestamp(this.createtime,"yyyyMMdd");
}
}
// check name of topic (if specified)

View file

@ -45,8 +45,10 @@ function evalNewStory(s,param,creator) {
}
s.editableby = !isNaN(parseInt(param.editableby)) ? parseInt(param.editableby,10) : null;
s.discussions = (param.discussions_array || param.discussions == null ? 1 : 0);
if (s.createtime)
s.day = s.createtime.format("yyyyMMdd");
if (s.createtime) {
// create day of story with respect to site-timezone
s.day = formatTimestamp(s.createtime,"yyyyMMdd");
}
s.ipaddress = param.http_remotehost;
s.reads = 0;