Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67503 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66796 invoked from network); 24 May 2013 18:52:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2013 18:52:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=ralph@ralphschindler.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ralph@ralphschindler.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ralphschindler.com from 209.85.214.169 cause and error) X-PHP-List-Original-Sender: ralph@ralphschindler.com X-Host-Fingerprint: 209.85.214.169 mail-ob0-f169.google.com Received: from [209.85.214.169] ([209.85.214.169:46290] helo=mail-ob0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/70-64297-0E6BF915 for ; Fri, 24 May 2013 14:52:16 -0400 Received: by mail-ob0-f169.google.com with SMTP id 16so5435648obc.28 for ; Fri, 24 May 2013 11:52:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=s0gl8p7kI1Z7fc8CbUIsDOtUK+CcuKYaUhZQ8VZDeEE=; b=o/76fAx4TniNjMi55QdyvG3zKpz7xYFi49u4aZ+VX/AM2uIcW66CLifs0RCI6Rj/fq fVGOS8jcKwOe4ZNU7J2qygjHkQxVgJ4mz38pGkqxW5yVPr737eibZ46qqJ8/RlBFwCxg Ohq/bCXc7aZIfpzyxCHgzErExLZg+eXdSv+Ogis/T45iSZuTBUtXADK2pPW5LyOZ5Xgw j4CJS0rXUUPSpbEoIBZEJbJI3w+YuQrLbUZcMlUJzRHCSFSzbZtNZX+l2DYIojCNLFon xHFZVOH6wiXmQ0qNPwcmsDN1/aFbiTIzHCd0GeQ4HcHYklql4CIk2ByR4DllQ6KATvB/ xgkg== X-Received: by 10.60.98.134 with SMTP id ei6mr13082773oeb.21.1369421533700; Fri, 24 May 2013 11:52:13 -0700 (PDT) Received: from Ralphs-Mac-Pro.local (ip174-73-14-247.no.no.cox.net. [174.73.14.247]) by mx.google.com with ESMTPSA id ns4sm18343873obc.2.2013.05.24.11.52.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 May 2013 11:52:12 -0700 (PDT) Message-ID: <519FB6DB.2080702@ralphschindler.com> Date: Fri, 24 May 2013 13:52:11 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Stas Malyshev CC: Daniel Lowrey , "internals@lists.php.net" References: <519E77B4.2050503@sugarcrm.com> In-Reply-To: <519E77B4.2050503@sugarcrm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmjHpVFlik5BAL+7GsYTzUn2fd5Uu3B5SZNiF+TkJ2b/q6tHtXPZLIeLZx8W9whj94n3lFB Subject: Re: [PHP-DEV] date.timezone E_WARNING -- Really necessary? What's the rationale? From: ralph@ralphschindler.com (Ralph Schindler) While UTC is not *ideal*, I am failing to see why its not a reasonable default. After all, according to http://us3.php.net/manual/en/function.date-default-timezone-get.php "If none of the above succeed, date_default_timezone_get() will return a default timezone of UTC." If people care about dealing with time's in a non-UTC way, it seems to me they they would either A) ensure their server is set to an appropriate timezone (by setting it or bugging their system administrator) or B) ensuring their app calls date_default_timezone_set() in a bootstrap/initialization script (globally) or C) set the timezone in an application context specific way through DateTime::setTimezone(). As far as I can tell, with all standard distribution extensions, there is no other extension that will toss a warning with the default configuration... thus making this the outlier. -ralph On 5/23/13 3:10 PM, Stas Malyshev wrote: > Hi! > >> I'm probably not the typical PHP user; I spend 99% of my PHP time >> using the CLI (and not web SAPIs). >> This means that I frequently run PHP without an .ini file. As a > > I'm not sure how this follows - CLI is capable of using ini file just > like the rest of SAPIs. Why not create it? > >> The "U" in UTC *does* stand for "Universal," after all. It's a >> sensible default and as such shouldn't > > I don't think it's a sensible default - people don't actually use UTC > when considering dates. A minority of people can use timezone that > coincides with UTC, but not very many use actual UTC. >