Day value seems to update at 01am not 00

I’m using date(time()).day in the log entry below in my Agent
toDay still showing 12 at 00:10:25 and correct at 01:10:25
Is this a GMT issue?

Tue Aug 13 2013 00:10:25 GMT+0100 (GMT Daylight Time): AlertMon Hr:0 notUp HR:9 toDay:12 day of last wake:12 notUp:false isUp:true

Tue Aug 13 2013 01:10:25 GMT+0100 (GMT Daylight Time): AlertMon Hr:1 notUp HR:9 toDay:13 day of last wake:13 notUp:false isUp:false

Had that same issue.
In my case it had to do with the timezone correction.
local d = date(time() + (timezone*60*60)); // get the date in your timezone
instead of

Dolf cheers for that