Halisco Posted March 1, 2009 Share Posted March 1, 2009 I have a experation script that works well until i get over approximately "10230" days. Once i get past that many days the value becomes negative. Any Ideas why this would happen? Here is my script: $BadDate = (( (strtotime($CertExp)) - (strtotime($todays_date)) ) / 60 / 60 / 24 ); if (($BadDate < 90 AND $BadDate > 0) OR ($BadDate < 0)){ $BadTh="thred"; $BadTd="tdred"; elseif ($BadDate == 0){ $BadTh="thred"; $BadTd="tdred"; }else{ $BadTh=""; $BadTd=""; } Link to comment https://forums.phpfreaks.com/topic/147383-expiration-date/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 1, 2009 Share Posted March 1, 2009 Because a UNIX Timestamp has a 2038 limit that makes it unusable for a lot of purposes, like birthdays and dates more than 29 years into the future. Link to comment https://forums.phpfreaks.com/topic/147383-expiration-date/#findComment-773615 Share on other sites More sharing options...
Halisco Posted March 1, 2009 Author Share Posted March 1, 2009 Because a UNIX Timestamp has a 2038 limit that makes it unusable for a lot of purposes, like birthdays and dates more than 29 years into the future. Is there a work around I can use to avoid getting this negative number. I have to use the dates in the database that are later then 2038. Link to comment https://forums.phpfreaks.com/topic/147383-expiration-date/#findComment-773623 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.