Bug #66963 [Fbk->Opn]: Same code returns different results after php update
| From: | pedro dot bicudo at tgtconsult dot com dot br | Date: | Thu, 27 Mar 2014 00:57:32 +0000 |
| Subject: | Bug #66963 [Fbk->Opn]: Same code returns different results after php update | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184910@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
User updated by: pedro dot bicudo at tgtconsult dot com dot br
Reported by: pedro dot bicudo at tgtconsult dot com dot br
Summary: Same code returns different results after php update
-Status: Feedback
+Status: Open
Type: Bug
Package: Date/time related
Operating System: Linux CentOS 6
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Yes, same timezone.Changing timezones did not change the results.
Previous Comments:
------------------------------------------------------------------------
[2014-03-26 22:57:32] aharvey@php.net
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().
------------------------------------------------------------------------
[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