PHP upgrade to v5.2.10

Chris Janton face at CentosPrime.COM
Thu Jun 25 09:07:16 PDT 2009


On 2009-06-25 , at 07:43 , Peter Oakley wrote:

> snippetStart - - - - - -
>
> $timestamp = time();
> //echo $timestamp;
> $thisYear = date('Y', $timestamp);
> echo $thisYear;
>
> - - - - - - snippetEnd
>
> After the PHP upgrade to v5.2.10, this yields "0000" for $thisYear.  
> Prior to the upgrade, $thisYear would be set to "2009". I also tried  
> using the time function directly within the date function: $thisYear  
> = date('Y', time()); Same result.
>
> One other possibly important detail: I've installed a variant: php5  
> +apache +macosx +mysql5 +t1lib


face at mac:~:129 $ cat foo.php
<?php
$timestamp = time();
$thisYear = date('Y', $timestamp);
echo $thisYear . "\n";
?>
face at mac:~:130 $ which php
/opt/local/bin/php
face at mac:~:131 $ php --version
PHP 5.2.10 (cli) (built: Jun 20 2009 08:25:00)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
face at mac:~:132 $ php <foo.php
2009
face at mac:~:133 $

My php is

     php5 @5.2.10_0+apache2+macosx+mysql5+pear (active)

face at mac:~:134 $ uname -a
Darwin mac.centosprime.com 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar  
31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386

Which version of OS X are you running?

8)
----------------------------------
Chris Janton  - face at CentosPrime dot COM
Netminder for Opus1.COM




More information about the macports-users mailing list