Hi!

On 8/30/11 9:53 PM, Stas Malyshev wrote:
strftime() on Mac seems to ignore timezone arguments in struct tm for
some reason and uses environment TZ instead. Not sure how to address that.

Looking into Mac strftime sources, it says this:

                        ** C99 says that the UTC offset must
                        ** be computed by looking only at
                        ** tm_isdst. This requirement is
                        ** incorrect, since it means the code
                        ** must rely on magic (in this case
                        ** altzone and timezone), and the
                        ** magic might not have the correct
                        ** offset. Doing things correctly is
                        ** tricky and requires disobeying C99;
                        ** see GNU C strftime for details.
                        ** For now, punt and conform to the
                        ** standard, even though it's incorrect.

Which means, since we can't touch the environment in php_date.c code, we have to set TZ env variable for the test to pass, and strftime for Mac is dependent on TZ env and we can't do a thing about it as it seems.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to