RE: [PHP-WIN] Bug in mktime-function ?This is the output I get running 4.0.4pl1 or
3.0.17 on Win98/Apache
Using 3/9/1935
Unix timestamp for this date is -1
Warning: unexpected error in date() in c:\inetpub\wwwdev\staffroot\myscu\date.php on
line 13
Reconverting...
What platform r u using?
Ignatius
-----Original Message-----
From: Boget, Chris [mailto:[EMAIL PROTECTED]]
Sent: Friday, 16 February 2001 02:16
To: 'Ignatius Teo'
Cc: Php (E-mail)
Subject: RE: [PHP-WIN] Bug in mktime-function ?
> Therefore any date on or before 1 Jan 1970 ain't going to
> work using mktime or any PHP function which returns a
> UNIX timestamp.
I'm sorry, but this is wrong. The following works with no
problems whatsoever.
<script language="php">
$month = 3;
$day = 9;
$year = 1935;
echo "Using $month/$day/$year<br>\n";
$oldDate = mktime( 0, 0, 0, $month, $day, $year );
echo "Unix timestamp for this date is $oldDate<br><br>\n";
echo "Reconverting... " . date( "F d, Y", $oldDate );
</script>
Chris