1 diff -urN php-5.2.8/ext/date/lib/parse_date.c php5.2-200902121330/ext/date/lib/parse_date.c
2 --- php-5.2.8/ext/date/lib/parse_date.c 2008-12-07 20:31:16.000000000 +0100
3 +++ php5.2-200902121330/ext/date/lib/parse_date.c 2009-02-12 14:51:26.000000000 +0100
4 @@ -22395,7 +22395,7 @@
6 void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options)
8 - if (!(options && TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) {
9 + if (!(options & TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) {
13 @@ -22415,7 +22415,7 @@
14 parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL;
16 if (!parsed->tz_info) {
17 - parsed->tz_info = now->tz_info ? timelib_tzinfo_clone(now->tz_info) : NULL;
18 + parsed->tz_info = now->tz_info ? (!(options & TIMELIB_NO_CLONE) ? timelib_tzinfo_clone(now->tz_info) : now->tz_info) : NULL;
20 if (parsed->zone_type == 0 && now->zone_type != 0) {
21 parsed->zone_type = now->zone_type;
22 diff -urN php-5.2.8/ext/date/lib/parse_date.c.orig php5.2-200902121330/ext/date/lib/parse_date.c.orig
23 --- php-5.2.8/ext/date/lib/parse_date.c.orig 2008-12-07 20:31:16.000000000 +0100
24 +++ php5.2-200902121330/ext/date/lib/parse_date.c.orig 2009-02-12 14:51:26.000000000 +0100
25 @@ -22483,7 +22483,7 @@
27 void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options)
29 - if (!(options && TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) {
30 + if (!(options & TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) {
34 @@ -22503,7 +22503,7 @@
35 parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL;
37 if (!parsed->tz_info) {
38 - parsed->tz_info = now->tz_info ? timelib_tzinfo_clone(now->tz_info) : NULL;
39 + parsed->tz_info = now->tz_info ? (!(options & TIMELIB_NO_CLONE) ? timelib_tzinfo_clone(now->tz_info) : now->tz_info) : NULL;
41 if (parsed->zone_type == 0 && now->zone_type != 0) {
42 parsed->zone_type = now->zone_type;
43 diff -urN php-5.2.8/ext/date/lib/parse_date.re php5.2-200902121330/ext/date/lib/parse_date.re
44 --- php-5.2.8/ext/date/lib/parse_date.re 2008-10-26 12:27:32.000000000 +0100
45 +++ php5.2-200902121330/ext/date/lib/parse_date.re 2008-12-18 16:43:49.000000000 +0100
48 void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options)
50 - if (!(options && TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) {
51 + if (!(options & TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) {
56 parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL;
58 if (!parsed->tz_info) {
59 - parsed->tz_info = now->tz_info ? timelib_tzinfo_clone(now->tz_info) : NULL;
60 + parsed->tz_info = now->tz_info ? (!(options & TIMELIB_NO_CLONE) ? timelib_tzinfo_clone(now->tz_info) : now->tz_info) : NULL;
62 if (parsed->zone_type == 0 && now->zone_type != 0) {
63 parsed->zone_type = now->zone_type;
64 diff -urN php-5.2.8/ext/date/lib/timelib.h php5.2-200902121330/ext/date/lib/timelib.h
65 --- php-5.2.8/ext/date/lib/timelib.h 2008-02-22 10:48:18.000000000 +0100
66 +++ php5.2-200902121330/ext/date/lib/timelib.h 2008-12-31 12:46:14.000000000 +0100
69 #define TIMELIB_NONE 0x00
70 #define TIMELIB_OVERRIDE_TIME 0x01
71 +#define TIMELIB_NO_CLONE 0x02
73 #define TIMELIB_SPECIAL_WEEKDAY 0x01
75 diff -urN php-5.2.8/ext/date/lib/timelib_structs.h php5.2-200902121330/ext/date/lib/timelib_structs.h
76 --- php-5.2.8/ext/date/lib/timelib_structs.h 2007-12-31 08:20:05.000000000 +0100
77 +++ php5.2-200902121330/ext/date/lib/timelib_structs.h 2008-12-31 12:46:14.000000000 +0100
79 #ifndef __TIMELIB_STRUCTS_H__
80 #define __TIMELIB_STRUCTS_H__
82 -#include <timelib_config.h>
83 +#include "timelib_config.h"
85 #ifdef HAVE_SYS_TYPES_H
86 #include <sys/types.h>
87 diff -urN php-5.2.8/ext/date/php_date.c php5.2-200902121330/ext/date/php_date.c
88 --- php-5.2.8/ext/date/php_date.c 2008-12-02 19:01:57.000000000 +0100
89 +++ php5.2-200902121330/ext/date/php_date.c 2008-12-31 12:46:14.000000000 +0100
91 t = timelib_strtotime(times, time_len, &error, DATE_TIMEZONEDB);
92 error1 = error->error_count;
93 timelib_error_container_dtor(error);
94 - timelib_fill_holes(t, now, 0);
95 + timelib_fill_holes(t, now, TIMELIB_NO_CLONE);
96 timelib_update_ts(t, tzi);
97 ts = timelib_date_to_int(t, &error2);