RE: [PHP] dates greater than 2002-01-18 create error
| From: | Jay Blanchard | Date: | Mon, 12 Aug 2002 16:23:42 +0000 |
| Subject: | RE: [PHP] dates greater than 2002-01-18 create error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112169@lists.php.net to get a copy of this message | ||
[snip]
<?
$day = "2038-01-19";
$day_temp = date("d", strtotime("$day"));
$month_temp = date("m", strtotime("$day"));
$year_temp = date("Y", strtotime("$day"));
$temp_date = mktime (0,0,0,$month_temp ,$day_temp+1 ,$year_temp);
echo date ("Y-m-d", $temp_date);
?>
[/snip]
I take out '+1' and the result is 1969-12-31
I put in the '+1' and the result is 1970-01-01
I change '2038-01-19' to '2002-01-19' and it works. Which is what the
subject of your message was, not [PHP] dates greater than 2038-01-18 create
error
HTH!
Jay