Hi!

On 03.08.2011 21:29, Joey Smith wrote:
>> 2011/8/4 Nicolai Scheer <sc...@planetavent.de>:
>>> 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"...

Greetings,

Nico

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to