PHP timezone

Diego Woitasen diegows at xtech.com.ar
Wed Dec 22 23:03:09 CET 2010


I have a weird problem with PHP timezone. It's looks like OpenPKG PHP and
Ubuntu PHP have different time zones. Steps to reproduce the problem:

# cat test.php
<?
print date('r') . "\n";
?>
# /usr/bin/php test.php
Wed, 22 Dec 2010 18:58:36 -0300
# /kolab/bin/php test.php
Wed, 22 Dec 2010 19:58:40 -0200

I haven't found a timezone parameter in php configuration. I don't
undertastand what's happening. This is breaking FB and other things.

and more confusing things (my timezone is Buenos_Aires, /etc/localtime is
correct):

# TZ="America/Argentina/Buenos_Aires" /kolab/bin/php test.php
Wed, 22 Dec 2010 20:00:26 -0200
# TZ="America/Argentina/Buenos_Aires" /usr/bin/php test.php
Wed, 22 Dec 2010 19:00:33 -0300
# TZ="America/Argentina/Catamarca" /kolab/bin/php test.php
Wed, 22 Dec 2010 19:00:52 -0300
# TZ="America/Argentina/Catamarca" /usr/bin/php test.php
Wed, 22 Dec 2010 19:00:40 -0300

My workaround now is using Catamarca as timezone in Horde config, but this
doesn't make any sense for me.

Regards,
 Diego

-- 
Diego Woitasen
XTECH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kolab.org/pipermail/users/attachments/20101222/ceadbeab/attachment.html>


More information about the users mailing list