$time is the same setup as time() and time() works fine. Time() is grabbing current time as a timestamp.. $time grabs the timestamp from the database..
I am using this on a windows server.. and the error I get is..
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970
But it works with time(), because it's not empty, but I'm guesing it's bringing the timestamp in as empty ..