On 08/30/2011 10:08 PM, Stas Malyshev wrote:
> 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.

Right, so this is an XFAIL test on the Mac I guess, although I don't
think we have any way to indicate a platform-specific XFAIL. So maybe
add a Mac check and make it a SKIP on the Mac.

-Rasmus

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

Reply via email to