On Mon, Sep 5, 2011 at 9:40 PM, Stas Malyshev <smalys...@sugarcrm.com> wrote:
> Hi!
>
> On 9/5/11 6:57 AM, Pierre Joye wrote:
>>
>> The main problem is that putenv and getenv are not thread safe and
>> many tests will fail either when using TS SAPIs or on Windows. This
>
> I'm not sure I understand how putenv() being non-thread-safe leads to tests
> failing - tests aren't threaded and AFAIK TS API doesn't do anything special
> there. Can you explain?

getenv and putenv are per se not threadsafe.

>> method is already deprecated and it is recommended to rely on the
>> other methods.
>
> Unfortunately, some functions - like strftime - still are TZ-dependant on
> some systems (like Darwin), so ignoring TZ altogether is not achievable. And
> once we have people use TZ, why not have it work for all?

It is not about ignoring the timezone, it is about dropping something
that we already have deprecated and that should have been removed
since long already. Also the date extension documents and say that the
right way to do it is to use either the ini settings or the tz setter
function.

strftime is a system function, not something we can do about it (and
noone should use it tbh, really not, there are better date/time
formatting function now). And users still relying on it can still set
the process TZ using putenv as they used to do, and get all the issues
 while being at it, they know them as they already live with them. The
only difference is that the date codes won't be affected.

Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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

Reply via email to