Re: 5.4 beta & tests

From: Date: Wed, 31 Aug 2011 05:08:14 +0000
Subject: Re: 5.4 beta & tests
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-55023@lists.php.net to get a copy of this message
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

« previous php.internals (#55023) next »