Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67567 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86640 invoked from network); 27 May 2013 23:35:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2013 23:35:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=rdlowrey@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rdlowrey@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.169 as permitted sender) X-PHP-List-Original-Sender: rdlowrey@gmail.com X-Host-Fingerprint: 209.85.223.169 mail-ie0-f169.google.com Received: from [209.85.223.169] ([209.85.223.169:37453] helo=mail-ie0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/27-44058-0DDE3A15 for ; Mon, 27 May 2013 19:35:45 -0400 Received: by mail-ie0-f169.google.com with SMTP id u16so19609672iet.14 for ; Mon, 27 May 2013 16:35:42 -0700 (PDT) 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 :content-type; bh=+5kz6y423jXcwXpjvrdU7l/L2RCrn2yM+NpAOBwF4eM=; b=rASXcOfhzX9+cmHJLkCJ3JznZtio7IfvQL3pGF+arJf3uCNnNM1ugf3iIrEvZ5AsKo P1iS/zrZldq/49p1jtyqUCjLQaI3Dw/UD5KaJD8RQmCyKF4IGxRGMjHr5f0bHaWc8F0Q qyo1ErtiazGZy4AHKDobiJVdveCSN/PojnLlOgk0KbPlDgnfX+S5qURAkVkB/6qjpi9p 5zxEHxVddSzvWbf/jui9D1R7KuE/AFiQav1mR37D9I/4TF1ixvdgQW2wzJTwqsWi8P+4 sl94FyVNKYP6kwtx/CdVlleXKx5zBii7BYbqMyMI5w+yISt56HKHWcciv+8WhWIY06bT +CsA== MIME-Version: 1.0 X-Received: by 10.50.107.106 with SMTP id hb10mr5891877igb.25.1369697742190; Mon, 27 May 2013 16:35:42 -0700 (PDT) Received: by 10.50.56.103 with HTTP; Mon, 27 May 2013 16:35:42 -0700 (PDT) In-Reply-To: References: Date: Mon, 27 May 2013 19:35:42 -0400 Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8f643b6e5f80c104ddbb9bec Subject: date.timezone E_WARNING -- Really necessary? What's the rationale? From: rdlowrey@gmail.com (Daniel Lowrey) --e89a8f643b6e5f80c104ddbb9bec Content-Type: text/plain; charset=ISO-8859-1 I understand that you can use php -d, but this is not a portable solution. My specific use case is running a libevent-based HTTP server and I cannot even run unit test suites without an .ini file because of this warning. Why does PHP force me to include configuration directives that it clearly doesn't need to function correctly? Forcing users to specify additional command line options on every execution is no less pointless than than requiring an .ini file where none is needed. A user's time zone setting is simply not a language-level concern. Nor is a user's inability to understand how timezones work. I appreciate Derrick's work on the extension but I have yet to see any valid justification for triggering an error when no error actually exists. On Monday, May 27, 2013, Pierre Joye wrote: > On Tue, May 28, 2013 at 12:57 AM, Daniel Lowrey > wrote: > > > > My problem with the current behavior is that it essentially *forces* > > the use of an .ini file by triggering an error if no default is > > assigned. > > No it does not. You can use: > > - php -d ... > - date_default_timezone_set > > > Now, as far as I can tell the only argument put forward to justify > > triggering the error is (summarized): many people are too stupid to > > set a timezone and don't understand why the results of their date() > > calls are different from their own timezone. This results in many > > erroneous bug reports. > > It is not one of the arguments. The arguments are bad TZ, invalid TZ > or inconsistent in system's TZ, which causes hard to catch bugs (and > not possible to fix), non portable code (if you rely on a bad TZ), to > name only a few. > > And I stop here for this discussion, I do not see any new arguments on > both sides and a default TZ will very unlikely happen. Packagers could > deal with that easily and application developers as well. > > Cheers, > -- > Pierre > > @pierrejoye | http://www.libgd.org > --e89a8f643b6e5f80c104ddbb9bec--