# easter_date()

- Thread: https://externals.io/message/27551
- Original archive: https://news-web.php.net/php.internals/27551
- Started by Oliver Block on 2007-01-20T21:55:43+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #27551 — Oliver Block — 2007-01-20T21:55:43+00:00

URL: https://externals.io/message/27551#27551

Hello,

after a failed test of the easter_date() function I've taken a look at the 
test file. The test file sets the default timezone to UTC.

To make it short:

easter_date() does not return correct results, if the default timezone (set 
with `date_default_timezone_set()` or INI date.timezone) is "left" of the local 
timezone, i.e. the UTC offset is less than the UTC offset of the local 
timezone. (The local timezone is determined by the computer that runs the 
test.)

To illustrate it:

The timezone on my computer is "Europe/Berlin" which is UTC +200 (+ 2 hours) 
according to php. If easter_date() is called on a timezone with an UTC offset 
< +200 you will always get one day less, e.g. 2000-04-22 instead of the 
correct result 2000-04-23. That is because at 2000-04-23T00:00:00 (midnight) 
you have 2000-04-22 on every timezone with an offset < +200).


Regards,

Oliver
