# Bug #63615 DateTime::modify() ignores timezone [PATCH]

- Thread: https://externals.io/message/64183
- Original archive: https://news-web.php.net/php.internals/64183
- Started by Paul Taulborg on 2012-12-06T15:25:27+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #64183 — Paul Taulborg — 2012-12-06T15:25:27+00:00

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

Okay, here is the proper fixed patch, tested via various methods:

$d1 = new DateTime;
while(1) {
// no memory leak
      $d1->modify("Tue, 10 Apr 2012 11:27:56 +0300");

// memory leak - now fixed with new patch
      $d1->modify("Tue, 10 Apr 2012 11:27:56 CST");

// no memory leak
      $d1->modify("Tue, 10 Apr 2012 11:27:56 Pacific/Chatham");
}


Attaching this second patch to the original bug report, as well as
including here.

Thanks!
