symfony/symfony — pull request #4601 by eriksencosta (2012-06-18 04:58:25+00:00)
Title: [WIP][Locale] StubIntlDateFormatter should use the TZ environment variable instead of the PHP's date.timezone setting

Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #3841
Todo: Check ext/intl changes for the next PHP 5.4 release
License of the code: MIT

[!Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=issue-3841)

There were changes that need to be investigated for the next PHP 5.4 release:

- [php-src @ eb346ef](https://github.com/php/php-src/commit/eb346ef0f419b90739aadfb6cc7b7436c5b521d9)
- [php-src @ 888e77f](https://github.com/php/php-src/commit/888e77ff733c5cb7c8f3d1fce6244463dd75a9b8)

A strong evidence of bug in ext/intl was found while testing `StubIntlDateFormatter`. See the comment available at the docblock of `StubIntlDateFormatterTest`'s `testFormatWithDefaultTimezoneIntlShouldUseTheTzEnvironmentVariableWhenAvailable()` method and the following Gist for test scripts: https://gist.github.com/2946342

Maybe the upcoming PHP 5.4 release fix this bug since it will use the PHP's `date.timezone` when no time zone is provided. If confirmed the bug, it will need to be reported to the ext/intl maintainers.