|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-01-23 19:29 UTC] oliver dot block at lycos dot de
Description:
------------
If the timezone is set to another value than the system timezone, easter_date() will return a timestamp with respect to the systems local time, not with respect to the set timezone.
That leads to wrong results of date/time function, e.g. date() which handle the (default) timestamp that is set my php (ini_set('date.timezone', 'UTC') or date_default_timezone_set() ).
The problem occurs, if the timezone set by php is "east" of the system's timezone, if e.g. php timezone is 'UTC' and systems timezone is 'Europe/Berlin'
Reproduce code:
---------------
/ext/calendar/tests/easter_date.phpt
Expected result:
----------------
the test
/ext/calendar/tests/easter_date.phpt
should pass.
Actual result:
--------------
the test
/ext/calendar/tests/easter_date.phpt
will fail.
Patchescorrect_easter_function_to_use_TimeZone (last revision 2013-09-17 12:24 UTC by pierre dot renaudet at gmail dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 19:00:01 2025 UTC |
I modified some of the testfiles from the former archives, because of wrong test results. It happens that easter date and DST shift occur on the same day. If so, date('Y-m-d H:i:s', easter_date($year)) will return a time portion of 01:00:00 and not 00:00:00 You find the archive here: http://www.block-online.eu/phptests/tests_easter_date.tar.gz