
November 9th, 2003, 11:15 AM
|
|
Contributing User
|
|
Join Date: Nov 2001
Location: Australia
Posts: 69
Time spent in forums: 8 h 15 m 48 sec
Reputation Power: 11
|
|
|
date() problem
Hi,
I tried to use the date() function with the mktime(). It keeps giving warning:
Warning: date(): Windows does not support dates prior to midnight (00:00:00), January 1, 1970
I could use the @ to surpress the warning but I would like to know why it's happening. Take a look at this. There doesn't seem to be anything wrong with it.
PHP Code:
<?
$timestamp = mktime(0,0,0,5,15,1980);
$mth = date("n", strtotime($timestamp));
$day = date("j", strtotime($timestamp));
$yr = date("Y", strtotime($timestamp));
echo "$mth $day $yr";
?>
Thank you
|