Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54325 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21862 invoked from network); 3 Aug 2011 20:10:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Aug 2011 20:10:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:41367] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/76-23811-F1BA93E4 for ; Wed, 03 Aug 2011 16:10:08 -0400 Received: from localhost (xdebug.org [127.0.0.1]) by xdebug.org (Postfix) with ESMTPS id 5E798DE9AF; Wed, 3 Aug 2011 21:10:04 +0100 (BST) Date: Wed, 3 Aug 2011 21:10:04 +0100 (BST) X-X-Sender: derick@whisky To: Nicolai Scheer cc: internals@lists.php.net In-Reply-To: <4E39A974.7080405@planetavent.de> Message-ID: References: <4E397879.4080007@planetavent.de> <20110803192954.GA8856@joeysmith.com> <4E39A974.7080405@planetavent.de> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] BUG 55240 - wrong date creation From: derick@php.net (Derick Rethans) On Wed, 3 Aug 2011, Nicolai Scheer wrote: > On 03.08.2011 21:29, Joey Smith wrote: > >> 2011/8/4 Nicolai Scheer : > >>> Hi! > >>> > >>> Did anyone had the time to review bug 55240 > >>> (https://bugs.php.net/bug.php?id=55240), yet? > >>> > > > > It definitely appears to be unexpected behaviour - the 'G' format for > > hours is "24-hour format without leading zeroes" - so the expectation > > would be that 'Gi' parses '800' as '8 hours and 0 minutes'. (Also, I > > thought I would point out here that the comments on 'G' and 'H', in > > timelib_parse_from_format are backwards here - same with 'g' and 'h'.) > > Unfortunately, there's nothing I could do about the strings to be parsed > (in terms of customer agreement...). > > "24-hour format without leading zeroes" is exactly what I had expected > from the 'G' format as well. "24-hour" somehow implies "not greater than > 24". On the other hand "overflow" handling might be expected (and even a > good thing to do?). > > Let's see what others are about to comment on the issue... > Personally I'd vote for "fixing" this by limiting the parsed value. > Another possibility would be to introduce a new format without the > "overflow handling"... Yes, this needs fixing. I am not sure how easy this is though... I've assigned the bug to myself. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug