php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #63615
Patch bug_63615_patch_2_memleak_fixed revision 2012-12-06 15:26 UTC by njaguar at gmail dot com
Patch bug_63615_fix_patch.txt revision 2012-12-05 22:29 UTC by njaguar at gmail dot com

Patch bug_63615_fix_patch.txt for Date/time related Bug #63615

Patch version 2012-12-05 22:29 UTC

Return to Bug #63615 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: njaguar@gmail.com

--- ../php-5.4.9_orig/ext/date/php_date.c	2012-11-20 23:12:20.000000000 -0600
+++ ext/date/php_date.c	2012-12-05 10:27:47.586424481 -0600
@@ -2763,6 +2763,24 @@
 			dateobj->time->s = 0;
 		}
 	}
+
+	if(tmp_time->zone_type) {
+		dateobj->time->zone_type = tmp_time->zone_type;
+		switch (tmp_time->zone_type) {
+		case TIMELIB_ZONETYPE_ID:
+			dateobj->time->tz_info = tmp_time->tz_info;
+			break;
+		case TIMELIB_ZONETYPE_OFFSET:
+			dateobj->time->z = tmp_time->z;
+			break;
+		case TIMELIB_ZONETYPE_ABBR:
+			dateobj->time->z = tmp_time->z;
+			dateobj->time->dst = tmp_time->dst;
+			dateobj->time->tz_abbr = strdup(tmp_time->tz_abbr);
+			break;
+		}
+	}
+
 	timelib_time_dtor(tmp_time);
 
 	timelib_update_ts(dateobj->time, NULL);
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Sep 15 16:01:27 2019 UTC