Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56929 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60308 invoked from network); 14 Dec 2011 23:10:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Dec 2011 23:10:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=chortos@inbox.lv; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chortos@inbox.lv; sender-id=pass Received-SPF: pass (pb1.pair.com: domain inbox.lv designates 89.111.3.82 as permitted sender) X-PHP-List-Original-Sender: chortos@inbox.lv X-Host-Fingerprint: 89.111.3.82 shark2.inbox.lv Received: from [89.111.3.82] ([89.111.3.82:34782] helo=shark2.inbox.lv) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/C9-02473-6FC29EE4 for ; Wed, 14 Dec 2011 18:10:46 -0500 Received: from mail.inbox.lv (pop [10.0.1.110]) by shark2-plain.inbox.lv (Postfix) with ESMTP id E8ABC9DEE; Thu, 15 Dec 2011 01:10:42 +0200 (EET) Received: from [192.168.1.139] (unknown [77.38.233.95]) (Authenticated sender: chortos@inbox.lv) by mail.inbox.lv (Postfix) with ESMTPSA id AF6F01D8CC; Thu, 15 Dec 2011 01:10:42 +0200 (EET) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii In-Reply-To: <4EE922F4.40602@gmail.com> Date: Thu, 15 Dec 2011 01:10:41 +0200 Cc: Will Fitch , Stas Malyshev , Derick Rethans , PHP Developers Mailing List Content-Transfer-Encoding: 7bit Message-ID: <3E25986A-8E61-4D63-BC07-48464E63F302@inbox.lv> References: <8D58A664-7250-4FEE-9424-2D2DEFC69308@inbox.lv> <1C397FE3-76E2-473B-B47F-194DAF3ACB39@inbox.lv> <4EE91556.3040909@sugarcrm.com> <4EE922F4.40602@gmail.com> To: =?utf-8?Q?=C3=81ngel_Gonz=C3=A1lez?= X-Mailer: Apple Mail (2.1084) X-Virus-Scanned: OK Subject: Re: [PHP-DEV] Local time zone From: chortos@inbox.lv (Oleg Oshmyan) > is present in *nix, Windows, and probably everywhere php runs. > As it provides mktime/gmtime/localtime, it should be possible to > portably deal with timezones. > At least when it's not multithreaded. PHP internally already has php_localtime_r and php_gmtime_r in main/php_reentrancy.h, implemented in main/reentrancy.c, and they are already used in various places in the code, including the guessing algorithm that is being removed in PHP 5.4. So at the very least thread-safety (and in fact portability too) should not become worse than it is now. > And if the host doesn't contain timezone data (embedded systems, > perhaps), that "System" zone could simply default to UTC. Sounds good. -- Oleg