Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55234 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46327 invoked from network); 5 Sep 2011 19:49:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2011 19:49:14 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:45309] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/82-25098-8B7256E4 for ; Mon, 05 Sep 2011 15:49:12 -0400 Received: by ywb3 with SMTP id 3so3798629ywb.29 for ; Mon, 05 Sep 2011 12:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ISR/COg0veiUZPJ7gtJ4Mgy0nM8qvBJWM1OXSMm4TVY=; b=H3tOEQiOV2VBmx1rVRIZl1q1mqN+5ANE5OpDAM9dp4uOlD48eg46kR12tN2fflwgd5 /gEo1USNBgroKkzY3vog8DpQbIwnQL0UZZAc0sJhLfTqMZGSTCWp9Pxso+NnnUUTaUVP md6KWS13KJ1B79iifHA5o02A5NaSVhF5Wzgcg= MIME-Version: 1.0 Received: by 10.150.166.3 with SMTP id o3mr3048127ybe.200.1315252149463; Mon, 05 Sep 2011 12:49:09 -0700 (PDT) Received: by 10.147.182.15 with HTTP; Mon, 5 Sep 2011 12:49:09 -0700 (PDT) In-Reply-To: <4E652597.7070600@sugarcrm.com> References: <4E652597.7070600@sugarcrm.com> Date: Mon, 5 Sep 2011 21:49:09 +0200 Message-ID: To: Stas Malyshev Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] drop TZ environment variable support in 5.4+? From: pierre.php@gmail.com (Pierre Joye) On Mon, Sep 5, 2011 at 9:40 PM, Stas Malyshev 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