ID:               21646
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wolfandreas at yahoo dot de
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: all
 PHP Version:      4.3.0
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




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

[2003-06-08 17:37:22] mog at nospam dot please

I'm having this problem on Redhat 7.3/PHP4.3.2

On our forum software (vBulletin) members profiles are showing
"Dec-31-1969" for people born before 1970.

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

[2003-02-25 23:54:21] [EMAIL PROTECTED]

Please do not use "all" for the OS field unless you know for certain
that it affects all platforms equally.

Most of the datetime related functions (strftime included) are
dependent on what support exists in the libraries on the running
system.  An example of this variable behavior is the time() function
which returns values from -2147483648 to 2147483647 on most unix
platforms, but only returns positive values under windows.

On your platform, strftime() only accepts positive values.  That is not
to say that strftime only accepts positive values on all platforms. 
Have you tried date()?

The strftime manual page already has a warning stating that not all
format specifiers are supported on all platforms, perhaps that should
be extended to warn of inconsistent support for timestamp values.

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

[2003-01-14 23:16:48] wolfandreas at yahoo dot de

Situation:
The function strftime does return false for negative unix-timestamps.

Problem:
The functions mktime and strtotime return negative values for dates
before 1970-01-01 00:00 UT.
Many users try something like:

strftime($format,strtotime($date_before_1970))

and wonder why this does not work.

If the behavior for timestamps before second 0 
(start of Jan 1., 1970 UT) is undefined why do all other time
functions
return negative values ?
The documentation for strftime does not say anything about negative
values for timestamps, too.

Solution:
Let strftime return values (Gregorian calendar) for negative
timestamps.
(Perhaps there should be a warning ?)

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

[2003-01-14 23:13:46] wolfandreas at yahoo dot de

Situation:
The function strftime does return false for negative unix-timestamps.

Problem:
The functions mktime and strtotime return negative values for dates
before 1970-01-01 00:00 UT.
Many users try something like:

strftime($format,strtotime($date_before_1970))

and wonder why this does not work.

If the behavior for timestamps before second 0 
(start of Jan 1., 1970 UT) is undefined why do all other time functions
return negative values ?
The documentation for strftime does not say anything about negative
values for timestamps, too.

Solution:
Let strftime return values (Gregorian calendar) for negative
timestamps.
(Perhaps there should be a warning ?)


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


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


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to