It\'s kind of a silly question, but what would be the maximum INT value of a time()
and it\'s future date, e.g.
1st January 2999
DateTime seems to use 32bit on 64bit servers, too. So you get into trouble.
I've solve it this way:
new DateTime("99999/12/31 00:00:00");
Because, the date overflows the maximum length for DateTime, date use the maximum possibel value and returns a DateTime-object like this (inspected with var_dump) :
object(DateTime)#9 (3) { ["date"]=> string(19) "2031-09-12 00:00:00" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/Berlin" } }
I'm not sure if it differs with the versions of PHP. I've tested it with version 5.4.