ID: 50930
User updated by: nathan dot kessler at hushmail dot me
Reported By: nathan dot kessler at hushmail dot me
-Status: Feedback
+Status: Open
Bug Type: Date/time related
Operating System: SuSE 7.3 i386 / gcc version 2.95
PHP Version: 5.*, 6
Assigned To: jani
New Comment:
It's defined with 1:
/* Define if you have the llabs function. */
#define HAVE_LLABS 1
Previous Comments:
------------------------------------------------------------------------
[2010-02-03 22:27:26] jani@php.net
What exactly is HAVE_LLABS defined in your main/php_config.h file? (in
the build)
------------------------------------------------------------------------
[2010-02-03 21:57:10] jani@php.net
Some links to help out a bit:
http://svn.php.net/viewvc/?view=revision&revision=291371
------------------------------------------------------------------------
[2010-02-03 21:53:43] jani@php.net
This is same thing as reported in bug #50899 and since this is much
better report, closing that one in favor of this.
llabs() is C99, so I guess that ancient GCC does not support it. I'd
suggest upgrading the compiler as first thing you do. Many other things
will break in future PHP versions as well if you stick with that. :)
I'll look into this, but since I don't have such old compiler around,
this might take a while.
------------------------------------------------------------------------
[2010-02-03 21:17:35] nathan dot kessler at hushmail dot me
Description:
------------
Right after updating 5.2.11 to 5.2.12 all phpscripts using
date(function showed wrong years:
2008 is 8624294332376
2009 is 8628589299673
2010 is 8632884266970
2011 is 8637179234267
2012 is 8641474201564
I reviewed patches of 5.2.12 and identified patch #50266 / revision
291371. If I compile without revision 291371 all years are fine. I see
no definition of llabs in my systems /usr/include/stdlib.h like
described in #50266. Perhaps this function is defined only under
solaris?
Reproduce code:
---------------
<?php echo date( 'Y' ); ?>
Expected result:
----------------
2010
Actual result:
--------------
8632884266970
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50930&edit=1