Patch bug66019.patch for Date/time related Bug #66019
Patch version 2016-08-07 16:35 UTC
Return to Bug #66019 |
Download this patch
Patch Revisions:
Developer: cmb@php.net
ext/date/lib/parse_date.re | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index 3d4cf6b..934d741 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -867,6 +867,7 @@ timetiny12 = hour12 space? meridian;
timeshort12 = hour12[:.]minutelz space? meridian;
timelong12 = hour12[:.]minute[:.]secondlz space? meridian;
+timetiny24 = 't'? hour24;
timeshort24 = 't'? hour24[:.]minute;
timelong24 = 't'? hour24[:.]minute[:.]second;
iso8601long = 't'? hour24 [:.] minute [:.] second frac;
@@ -1127,19 +1128,21 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
return TIMELIB_TIME24_WITH_ZONE;
}
- timeshort24 | timelong24 /* | iso8601short | iso8601norm */ | iso8601long /*| iso8601shorttz | iso8601normtz | iso8601longtz*/
+ timetiny24 | timeshort24 | timelong24 /* | iso8601short | iso8601norm */ | iso8601long /*| iso8601shorttz | iso8601normtz | iso8601longtz*/
{
int tz_not_found;
- DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
+ DEBUG_OUTPUT("timetiny24 | timeshort24 | timelong24 | iso8601long");
TIMELIB_INIT;
TIMELIB_HAVE_TIME();
s->time->h = timelib_get_nr((char **) &ptr, 2);
- s->time->i = timelib_get_nr((char **) &ptr, 2);
if (*ptr == ':' || *ptr == '.') {
- s->time->s = timelib_get_nr((char **) &ptr, 2);
+ s->time->i = timelib_get_nr((char **) &ptr, 2);
+ if (*ptr == ':' || *ptr == '.') {
+ s->time->s = timelib_get_nr((char **) &ptr, 2);
- if (*ptr == '.') {
- s->time->f = timelib_get_frac_nr((char **) &ptr, 8);
+ if (*ptr == '.') {
+ s->time->f = timelib_get_frac_nr((char **) &ptr, 8);
+ }
}
}
|