Bug #66963 [Opn->Fbk]: Same code returns different results after php update
| From: | aharvey@php.net | Date: | Wed, 26 Mar 2014 22:57:32 +0000 |
| Subject: | Bug #66963 [Opn->Fbk]: Same code returns different results after php update | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184908@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66963&edit=1
ID: 66963
Updated by: aharvey@php.net
Reported by: pedro dot bicudo at tgtconsult dot com dot br
Summary: Same code returns different results after php update
-Status: Open
+Status: Feedback
Type: Bug
-Package: Built-in web server
+Package: Date/time related
Operating System: Linux CentOS 6
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Are you sure that each PHP version is running with the same default time zone set? You can check
that by calling date_default_timezone_get().
Previous Comments:
------------------------------------------------------------------------
[2014-03-26 22:52:54] pedro dot bicudo at tgtconsult dot com dot br
Description:
------------
Using amazon-linux-ami/2013.09; Linux 3.4.48-45.46.amzn1.x86_64 on x86_64. Date shown for user is
wrong. To isolate any database error during test, I've created the date with php and then show
the timestamp. Different versions of php show different results. Version 5.3.28 is the latest PHP
available for his AWS instance. Apache 2.2.26.
Test script:
---------------
$date=date_create("2014-01-01");echo date_timestamp_get($date);
$date=date_create("2014-06-14");echo date_timestamp_get($date);
Expected result:
----------------
For date 2014-01-01:
php 5.3.26 returns 1388534400 (correct result)
php 5.3.28 returns 1388541600
For date 2014-01-01:
php 5.3.26 returns 1402704000 (correct result)
php 5.3.28 returns 1402714800
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66963&edit=1