Bug #61458 [Opn->Nab]: unixtojd() undefined
| From: | rasmus@php.net | Date: | Tue, 20 Mar 2012 23:00:24 +0000 |
| Subject: | Bug #61458 [Opn->Nab]: unixtojd() undefined | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-168671@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61458&edit=1
ID: 61458
Updated by: rasmus@php.net
Reported by: lsiden at gmail dot com
Summary: unixtojd() undefined
-Status: Open
+Status: Not a bug
Type: Bug
Package: Date/time related
Operating System: SunOS 5.10
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
--enable-calendar=shared doesn't mean the extension is enabled. It means it was
built shared. Without an extension=calendar.so in your php.ini it won't be
loaded.
Previous Comments:
------------------------------------------------------------------------
[2012-03-20 21:08:00] lsiden at gmail dot com
Description:
------------
Since upgrading from PHP 5.2.9 to 5.3.10, PHP is throwing the error:
... PHP Fatal error: Call to undefined function unixtojd() in .../unixtojd.php on
line 5
Checking phpinfo(), I can see that the calendar lib is enabled:
'--enable-calendar=shared'
Searching on Google for posts since the first release of PHP 5.3 (June 30, 2009)
did not reveal much more: http://goo.gl/2YbWj
If anyone has an answer, please notify me
Thank you!
Test script:
---------------
<pre>
<?
$time = time();
echo ( ($time)); echo "\n";
echo unixtojd($time); echo "\n";
//die ("got here");
function showdiff($s1, $s2) {
echo ("showdiff($s1, $s2)\n");
$t1 = strtotime($s1);
$t2 = strtotime($s2);
//echo unixtojd($t2); echo "\n";
echo (unixtojd($t2) - unixtojd($t1)); echo "\n";
}
showdiff("1.1.2012 00:00:00 GMT", "15.1.2012 00:00:00 GMT");
showdiff("1.3.2012 00:00:00 GMT", "15.3.2012 00:00:00 GMT");
?>
</pre>
Expected result:
----------------
1332277193
2456007
showdiff(1.1.2012 00:00:00 GMT, 15.1.2012 00:00:00 GMT)
14
showdiff(1.3.2012 00:00:00 GMT, 15.3.2012 00:00:00 GMT)
14
Actual result:
--------------
... PHP Fatal error: Call to undefined function unixtojd() in .../unixtojd.php on
line 5
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61458&edit=1