Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81260 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35742 invoked from network); 27 Jan 2015 20:16:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jan 2015 20:16:31 -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.192.50 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.192.50 mail-qg0-f50.google.com Received: from [209.85.192.50] ([209.85.192.50:36254] helo=mail-qg0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/7D-59067-E12F7C45 for ; Tue, 27 Jan 2015 15:16:31 -0500 Received: by mail-qg0-f50.google.com with SMTP id f51so13528507qge.9 for ; Tue, 27 Jan 2015 12:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Q3b3LKZ/8c8UgM12rnzavSFLDOofqAXna/OVzWSG3LI=; b=b+sMNQEqDJo2b/3/zJ2vCL7KRBHi/T2qlGAqiFZ+ojGHFHvaMqYVoY/8c+c/53ORFD 0XEHuLXKTB2BHN//bORML0oyvhBz1wkYLr+iuMnAr1MJC2zdmuN40J/9+GKyH1viH4o9 7ouFoF2x/sKO4GRuinQ0nVw2uDo7XGs13SGSW5Wx8h0MjvgxdE/VAS1N0iqU6wjJ6R0n ArKrYfuT8/ra5HlddL8FuhcggJ77r7qQ1Y37AEHb1+Pcx7kuzpfk1qS64A84DAvWpWfm CpbinhN059viCQArszenJVw7FHqUwu5VSxomFtavA9E5r+AHH2tkne1tjOUg1a7iS10i u5dw== MIME-Version: 1.0 X-Received: by 10.224.113.200 with SMTP id b8mr5335967qaq.35.1422389787837; Tue, 27 Jan 2015 12:16:27 -0800 (PST) Received: by 10.96.3.168 with HTTP; Tue, 27 Jan 2015 12:16:27 -0800 (PST) Received: by 10.96.3.168 with HTTP; Tue, 27 Jan 2015 12:16:27 -0800 (PST) In-Reply-To: References: Date: Wed, 28 Jan 2015 03:16:27 +0700 Message-ID: To: Derick Rethans Cc: Bob Weinand , Yasuo Ohgaki , Kalle Sommer Nielsen , PHP internals Content-Type: multipart/alternative; boundary=047d7bea30cc0973c2050da7ee62 Subject: Re: [PHP-DEV] [RFC] Remove the date.timezone warning From: pierre.php@gmail.com (Pierre Joye) --047d7bea30cc0973c2050da7ee62 Content-Type: text/plain; charset=UTF-8 On Jan 27, 2015 4:36 PM, "Derick Rethans" wrote: > > On Tue, 27 Jan 2015, Pierre Joye wrote: > > > On Jan 27, 2015 11:25 AM, "Yasuo Ohgaki" wrote: > > > > > > On Tue, Jan 27, 2015 at 12:56 PM, Kalle Sommer Nielsen > > > wrote: > > > > > > > I think the warning is fair as it is, if it is annoying for small > > > > use cases like on the CLI then simply: php -d date.timezone=UTC -r > > > > "echo date('H:i:s');" or the dirty way by using the silent > > > > operator. It used to be a notice prior 5.3 I think or something. > > > > > > > > While I do agree that most applications should be using UTC, which > > > > should be set by default we sometimes need to tell userland the > > > > hard way how things work, and/or what they should care about, like > > > > the E_WARNING, E_CORE_ERROR, E_DEPRECATED for old php.ini > > > > settings. > > > > > > > > -1 for removing it from my side. > > > > > > I can understand your argument. Perhaps, we may reconsider to > > > introduce E_DEBUG/E_USER_DEBUG for these purposes. There are many > > > functions, e.g. file related, that I feel E_WARNING is excessive. > > > > I do not have a strong opinion on that. So keep it or make it UTC > > default but please do not add yet another warning/notice/whatever. > > > > Also, setting a timezone is not about Dev or other fancy tasks, it is > > about making datetime processing right. > > > > If anything I would enforce the default at configure/build time. So it > > at least gets the correct one from a host point of view. > > That would be nice, but it's unfortuntately not really possible. You > can't find out what timezone the OS is using in a portable way. Not even > among different linux distributions, let alone having Windows in the > mix. We tried this before, and because it caused so many issues, the > current warning was added (instead of trying to guess a timezone). Either we get a valid one at install time or we bail out during make install. Do not worry about windows here, no biggie either. I am not saying we must do that but it is by far friendlier that we do now or what it is proposed. > cheers, > Derick --047d7bea30cc0973c2050da7ee62--