From:             oleg at programstar dot com
Operating system: Fedora 4.1
PHP version:      5.1.4
PHP Bug Type:     Date/time related
Bug description:  strtotime return invalid timestamp (if input value is 
timestamp)

Description:
------------
I’ve found a bug in strtotime() function.
The present function does not return anything if you transmit
unix_timestamp as a function parameter. However, if the last four digits
of the value compose a valid year value, the function tries to calculate
the whole date with the last 5 digits. Probably it fails there so it
returns unix_timestamp the dates with the day and month equal to the
current one, as far as the year goes, it is the one that the function has
detected in the timestamp primary value. 

Example: 
Primary value: 1136412001 (January, 5, 2006)
On return: 998037401 (August, 17, 2001)

This way, a standard plug-in Smarty uses this function to transform the
UNIX_TIMESTAMP format data into any data value. 
PHP Version 5.1.4

Original here: http://hcjack.livejournal.com/322438.html (on russian)


-- 
Edit bug report at http://bugs.php.net/?id=38481&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38481&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38481&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38481&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38481&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38481&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38481&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38481&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38481&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38481&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38481&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38481&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38481&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38481&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38481&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38481&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38481&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38481&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38481&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38481&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38481&r=mysqlcfg

Reply via email to