ID:               17190
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Documentation problem
 Operating System: Windows NT 4.0
 PHP Version:      4.2.0
 New Comment:

Yep,

the exact output is

Invalid date range
Warning:  unexpected error in date() in D:\Test\t.php on line 8



Previous Comments:
------------------------------------------------------------------------

[2002-05-22 06:52:35] [EMAIL PROTECTED]

Please, someone check on Windows the routine I wrote.  Maybe on Windows
date() return error if time is -1.

------------------------------------------------------------------------

[2002-05-22 06:50:46] [EMAIL PROTECTED]

I'm using PHP 4.1.2 and no error on date() as got on:

<?PHP
error_reporting(E_ALL);
$time = strtotime("1850-10-10");
if ($time == -1)
{
        print "Invalid date range\n";
}
print date("d-m-Y",$time);

?>


The only error is that date will allways show the date of time = -1 on
invalid range (< 1970  OR > 2038).

Is only a code bug. You should verify if $time is -1.




------------------------------------------------------------------------

[2002-05-14 04:08:10] [EMAIL PROTECTED]

Look also www.php.net/strtotime

------------------------------------------------------------------------

[2002-05-14 03:53:09] [EMAIL PROTECTED]

Reopening as a documentation problem.

I threw a quick glance on the php.net/date page last night and I
couldn't find it there. If it's nere, it needs to be outlined better,
or well, documented at all.

------------------------------------------------------------------------

[2002-05-14 02:19:09] [EMAIL PROTECTED]

Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php

Thank you for your interest in PHP.

This is a problem in Windows, not in PHP.

Derick

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/17190

-- 
Edit this bug report at http://bugs.php.net/?id=17190&edit=1

Reply via email to