summaryrefslogtreecommitdiff
path: root/ext/date/lib/timelib.c
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2006-04-11 18:03:52 (GMT)
committerDerick Rethans <derick@php.net>2006-04-11 18:03:52 (GMT)
commit4043f77e36b575ece28c5bfa3fd4297798d6e8c3 (patch)
tree68280e3e1018ecc51dcbc5fb63bf7203bd42bf49 /ext/date/lib/timelib.c
parent4bab5226b284613b7cda0dc5e0283e6b129b6106 (diff)
downloadphp-4043f77e36b575ece28c5bfa3fd4297798d6e8c3.tar.gz
- MFH: Fixed bug #37017 (strtotime fails before 13:00:00 with some time zones
identifiers). (Derick) - MFH: Fixed bug #36988 (mktime freezes on long numbers). (Derick) - MFH: Implemented better error and warning handling that is also used for the date_parse() function. - MFH: Fixed problems with "T" in front of a time string was seen as a time zone string. - MFH: Fixed a problem were 5 and 6 character timezone abbreviations where not correctly parsed. Experimental support (All MFH): - Added the date_parse() function that returns a parsed date/time string including warnings and errors. - Added the timezone_name_from_abbr() function that exposes the guessing mechanism that tries to find a timezone identifier from a timezone abbreviation and GMT offset.
Diffstat (limited to 'ext/date/lib/timelib.c')
-rw-r--r--ext/date/lib/timelib.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/date/lib/timelib.c b/ext/date/lib/timelib.c
index e1b936e..071d6f4 100644
--- a/ext/date/lib/timelib.c
+++ b/ext/date/lib/timelib.c
@@ -122,6 +122,21 @@ char *timelib_get_tz_abbr_ptr(timelib_time *t)
return t->tz_abbr;
}
+void timelib_error_container_dtor(timelib_error_container *errors)
+{
+ int i;
+
+ for (i = 0; i < errors->warning_count; i++) {
+ free(errors->warning_messages[i].message);
+ }
+ free(errors->warning_messages);
+ for (i = 0; i < errors->error_count; i++) {
+ free(errors->error_messages[i].message);
+ }
+ free(errors->error_messages);
+ free(errors);
+}
+
signed long timelib_date_to_int(timelib_time *d, int *error)
{
timelib_sll ts;