Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60605 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99856 invoked from network); 17 May 2012 21:34:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 May 2012 21:34:45 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:48477] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0F/79-45818-2FE65BF4 for ; Thu, 17 May 2012 17:34:43 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id CE41270003EF for ; Thu, 17 May 2012 22:34:38 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id IwaA9zsoctwW for ; Thu, 17 May 2012 22:34:38 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 94AE970003EE for ; Thu, 17 May 2012 22:34:38 +0100 (WEST) Received: from damnation (damnation-air.nl.lo.geleia.net [IPv6:2001:470:94a2:4:7d06:1af1:ea64:2d52]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id D66C1200583A for ; Thu, 17 May 2012 22:34:36 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "internals@lists.php.net" Date: Thu, 17 May 2012 23:34:37 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: User-Agent: Opera Mail/11.64 (Win32) Subject: IntlCalendar/IntlTimeZone and ext/date From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") I've made some modifications to ext/intl's IntlCalendar/IntlTimeZone to improve interoperability. * DateTimeZone is now accepted in all places time zones are expected in IntlCalendar. * Added IntlTimeZone::toDateTimeZone() and IntlTimeZone::fromDateTimeZone(). * Added IntlCalendar::toDateTime() and IntlCalendar::fromDateTime(). Unfortunately, ext/date doesn't expose a lot of interfaces to manipulate its objects, so in some places I ended up having to call PHP_FUNCTIONs (in one case even twice doing to a bug; see https://github.com/cataphract/php-src/commit/3a81f90ebc51140484c617539b1a5fb0e117f4e2#L1R1264 ). The conversion from DateTimeZone to IntlTimeZone is made through the ids only because ext/date doesn't expose interfaces to efficiently implement ICU's TimeZone. This may lead to some different behavior for the same time zone id if the databases are out of sync. The changes are here: https://github.com/cataphract/php-src/compare/intl_calendar If no one objects, I'll merge it soon. -- Gustavo Lopes