Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56954 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68504 invoked from network); 20 Dec 2011 00:35:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Dec 2011 00:35:46 -0000 Authentication-Results: pb1.pair.com header.from=davidkmuir@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=davidkmuir@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: davidkmuir@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qy0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:62596] helo=mail-qy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/64-38867-268DFEE4 for ; Mon, 19 Dec 2011 19:35:46 -0500 Received: by qcsd16 with SMTP id d16so3696469qcs.29 for ; Mon, 19 Dec 2011 16:35:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=6UiCSYS0q7xoXPnXkIsLekEXvmHaYCoewOwq0JhGIDE=; b=d29XlGdS/VST5HqDfjdb8/0yep1igZ24PZDH0NWjvAhEK8zQExVUS0nZ/lgtTCwMIJ uA4vKEQixWhdp7EnxSArqjE3dq8+1lAYF2UWG0ANRmYq86jnBT6WkFDGghAEpKiqLfA1 YRON5T5tUxbo0uywHuA/yQLIO/OPl/jqK/qp0= Received: by 10.224.98.8 with SMTP id o8mr27791047qan.79.1324341343784; Mon, 19 Dec 2011 16:35:43 -0800 (PST) Received: from [192.168.0.13] (dsl-202-173-152-56.vic.westnet.com.au. [202.173.152.56]) by mx.google.com with ESMTPS id q14sm43553657qap.4.2011.12.19.16.35.39 (version=SSLv3 cipher=OTHER); Mon, 19 Dec 2011 16:35:42 -0800 (PST) Message-ID: <4EEFD86D.8090905@gmail.com> Date: Tue, 20 Dec 2011 11:35:57 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: Pierre Joye CC: Stas Malyshev , Will Fitch , Oleg Oshmyan , Derick Rethans , PHP Developers Mailing List References: <8D58A664-7250-4FEE-9424-2D2DEFC69308@inbox.lv> <1C397FE3-76E2-473B-B47F-194DAF3ACB39@inbox.lv> <4EE91556.3040909@sugarcrm.com> <4EE91FDE.1060005@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Local time zone From: davidkmuir@gmail.com (David Muir) On 15/12/11 21:17, Pierre Joye wrote: > On Wed, Dec 14, 2011 at 11:14 PM, Stas Malyshev wrote: >> Hi! >> >> >>> I believe he's referring to sys/time.h, but this introduces >>> portability issues. If it were just unix, that would be one thing. >>> But maintaining this and a Windows alternative, and I have no idea >>> what that is, is not worth it IMO. >> >> Yes, portability is questionable. Though if we had a good patch that allows >> to do it, I don't think it would be too bad to have it. Even Unix-only might >> be (again, if enough people need it) fine, if we could use the data properly >> in timelib functions. > By portability it is not (only) about APIs, APIs wrapping is easy > these days, even on Windows. > > But the actual problem is to get a consistent and constantly updated > set of data, reliable data. Data that applications can use blindly on > any platforms without having to worry about bad information, as long > as they use the latest PHP or timezone release (via PECL for example). > > And that, as stated earlier, is why we should not provide any > alternative as any other solutions failed so far. It is also even less > important as Oleg's target is the developer environment. If a > developer cannot set his TZ correctly in a php.ini or in his > application on his development box, then something is wrong there, but > not in php :) > > For production server, I would never ever suggest to use the system's > TZ, no matter the OS/distros/etc.. > > Cheers, Isn't this whole thread about client-side apps, not server-side. For client-side stuff it doesn't make sense to use anything but the system tz. Should we be expecting users to have to edit php.ini files every time they hop on a plane or drive across a tz border? And what about non-developers? Keeping the tz database up to date is a very annoying issue. System tz data is typically more up-to-date as it's pushed to the user, while with php, you need to have admin rights to install an updated tz database, or hope that the packager for your distro (or your web-host) does it for you. As far as I can tell, most hosts do not update timezone data from PECL. I just checked one host that is still on 5.2: date/time support enabled "Olson" Timezone Database Version 2010.9 Timezone Database internal Default timezone UTC Sigh... Ubuntu however reports 0.system as the tz version. Does that mean that PHP there is using the system's tz database instead? Cheers David