I am bumbing this because I made an error in the getUTC, that caused an addition/subtraction of a day in the getUTC function.
The code needs to be replaced with:
PHP Code:
function getUTC(year,month,day,hour,minutes,seconds) {
// Given the year, month, day, hour, minutes, and seconds
// It will return the UTC var (Unix standard time)
// IE: the number of seconds since Jan 1st, 1970
// IE timevar2 in graal.
year -= 1601;
sendtorc(isLeapYear(year) SPC isLeapYear(temp.year2));
temp.days = int(year/400) - int(year/100) + int(year/4) + year * 365;
temp.daysinmonth = {31,28 + isLeapYear(year+1),31,30,31,30,31,31,30,31,30,31};
for(i=0;i<month-1;i++)
temp.days += temp.daysinmonth[i];
temp.days += day - 134775;
return temp.days * 86400 + hour * 3600 + minutes * 60 + seconds;
}
Apparently I cannot edit my original post anymore.