ID:               45358
 Updated by:       [EMAIL PROTECTED]
 Reported By:      viorel dot irimia at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: Debian GNU/Linux 4.0
 PHP Version:      5.2.6
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of #45359


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

[2008-06-25 20:46:35] viorel dot irimia at gmail dot com

This is not suppose to happen.

>From PHP manual: 
Return Values:
Returns a timestamp on success, FALSE otherwise. Previous to PHP 5.1.0,
this function would return -1 on failure.

A timestamp is an unsigned integer. Of course in PHP there is no such
thing. I still belive is an integer overflow.

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

[2008-06-25 20:28:37] smlerman at gmail dot com

'1214431948' is being understood as
'HHiissYYYY'

var_dump(date('Y-m-d H:i:s', strtotime('1214431947'))); will show you
what's happening.

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

[2008-06-25 19:50:44] viorel dot irimia at gmail dot com

Description:
------------
It seems that var_dump(strtotime('1214431948')); is returning
int(-678980717) instead timestamp / false / -1
I belive is an overflow somewhere...

Version:
PHP Version 5.2.0-8+etch11
Build Date      May 10 2008 10:31:53
Linux 2.6.18-6-686, debian 4.0


Reproduce code:
---------------
var_dump(strtotime('1214431948'));
var_dump(strtotime('1214431946'));

Expected result:
----------------
false | -1
false | -1

Actual result:
--------------
int(-678980717)
int(-742139117)


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


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

Reply via email to