Project

General

Profile

Feature #16735 » 20080216_negative_timestamps.diff

Administrator Admin, 2008-02-16 18:33

View differences:

t3lib/jsfunc.evalfield.js (working copy)
add = this.pol(values.valPol[2],this.parseInt(values.values[2]));
}
var year = (values.values[1])?this.parseInt(values.values[1]):this.getYear(today);
if ( (year>=0&&year<38) || (year>=70&&year<100) || (year>=1970&&year<2038) ) {
if ( (year>=0&&year<38) || (year>=70&&year<100) || (year>=1902&&year<2038) ) {
if (year<100) {
year = (year<38) ? year+=2000 : year+=1900;
}
......
}
var year = (values.values[3])?this.parseInt(values.values[3]):this.getYear(today);
if ( (year>=0&&year<38) || (year>=70&&year<100) || (year>=1970&&year<2038) ) {
if ( (year>=0&&year<38) || (year>=70&&year<100) || (year>=1902&&year<2038) ) {
if (year<100) {
year = (year<38) ? year+=2000 : year+=1900;
}
......
this.lastDate = this.getTimestamp(theTime);
}
this.lastDate+=add*24*60*60;
if (this.lastDate<0) {this.lastDate=0;}
return this.lastDate;
break;
case "time":
......
}
function evalFunc_getTimestamp(timeObj) {
return Date.parse(timeObj)/1000;
}
}
(3-3/3)