php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61987
Patch php_data.patch revision 2012-05-14 14:51 UTC by zhanglijiu at gmail dot com

Patch php_data.patch for Date/time related Bug #61987

Patch version 2012-05-14 14:51 UTC

Return to Bug #61987 | Download this patch
Patch Revisions:

Developer: zhanglijiu@gmail.com

--- php_date_old.c	2012-05-14 23:51:22.000000000 +1000
+++ php_date.c	2012-05-15 00:49:41.000000000 +1000
@@ -948,7 +948,10 @@ static char *date_format(char *format, i
 	timelib_time_offset *offset = NULL;
 	timelib_sll          isoweek, isoyear;
 	int                  rfc_colon;
-
+    if (!strcmp(format, "Q"))
+    {
+         format="YmdHis";
+    }
 	if (!format_len) {
 		return estrdup("");
 	}
@@ -978,7 +981,6 @@ static char *date_format(char *format, i
 
 	for (i = 0; i < format_len; i++) {
 		rfc_colon = 0;
-        print ("%c", format[i]);
 		switch (format[i]) {
 			/* day */
 			case 'd': length = slprintf(buffer, 32, "%02d", (int) t->d); break;
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jan 28 17:03:58 2023 UTC