Since the serialtime udf don't change the date after midnight I had to find a way to change it.

When $time + $timediff gives a time in the next day the date must changed with one day: 23:45 + 00:30 = 00:15 => date = date + 1.

When I use the timediff UDF 24:00 is at the begining of the day and not at the and so the diffence between 24:00 and 23:59 = 23:59

That's why I tried something with datetimediff: When the difference between 24:00 and 23:59 = 23:59 the difference between 30/12/2003 23:59 and 31/12/2003 24:00 must be one minute.

When the difference is less than 30minutes ($timediff) the date must change one day.

I Hope you understand what I intend to do.
$dd = datetimediff($date+$time,$nextday+' 00:00') isn't a final part of the script and is accidently copied to this topic.


De beste wensen en een gelukkig nieuw jaar
Best wishes and a happy new year
_________________________
Co