Deluge script for maximum(added_time) functionality changed (timezone??)

Deluge script for maximum(added_time) functionality changed (timezone??)

Hello,

In my form I have a script which until yesterday worked fine. But now it returns wrong data. It reads last record by added time. It returns time 9 hours back, it is really strange, because the seconds and minutes are OK, just the hours are 9  hours back, as if the code would work in different timezone? In below case, - l_last_day variable returns the wrong time.


Please help!!!

Code:


l_akt = Visits[ID != 0 && Added_User = zoho.loginuser] sort by Added_Time desc;
if(l_akt.maximum(Added_Time) = null)
{
l_last_day = '01.01.2010';
}
else
{
l_last_day = l_akt.maximum(Added_Time);
}
l_today = today.toDate();
l_time_buffer = (now - l_last_day) / 1000;