t_machine Posted May 28, 2009 Share Posted May 28, 2009 There seems to be a problem with time() function if I add many years. Example; $fifty_years_from_now = 1577846300+time(); If I do a date() on the variable I get 22/04/1923 echo date("d/m/Y", $fifty_years_from_now); What am I doing wrong? Thanks Link to comment https://forums.phpfreaks.com/topic/160080-solved-adding-50-years-to-time-issue/ Share on other sites More sharing options...
waynew Posted May 28, 2009 Share Posted May 28, 2009 In 2038... http://en.wikipedia.org/wiki/Year_2038_problem Link to comment https://forums.phpfreaks.com/topic/160080-solved-adding-50-years-to-time-issue/#findComment-844554 Share on other sites More sharing options...
Michdd Posted May 28, 2009 Share Posted May 28, 2009 http://en.wikipedia.org/wiki/Year_2038_problem Edit: I'm late =\ Link to comment https://forums.phpfreaks.com/topic/160080-solved-adding-50-years-to-time-issue/#findComment-844555 Share on other sites More sharing options...
t_machine Posted May 28, 2009 Author Share Posted May 28, 2009 Thanks for the explanation Would this apply if I store my dates as DATETIME in mysql instead? Link to comment https://forums.phpfreaks.com/topic/160080-solved-adding-50-years-to-time-issue/#findComment-844556 Share on other sites More sharing options...
waynew Posted May 28, 2009 Share Posted May 28, 2009 I don't think so. Link to comment https://forums.phpfreaks.com/topic/160080-solved-adding-50-years-to-time-issue/#findComment-844559 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.