david           Tue Jan  9 20:01:02 2001 EDT

  Modified files:              
    /php4/ext/standard  datetime.c 
  Log:
  Allocate buffer in date() for the actual length of the timezone (bug#8292)
  
  
Index: php4/ext/standard/datetime.c
diff -u php4/ext/standard/datetime.c:1.60 php4/ext/standard/datetime.c:1.61
--- php4/ext/standard/datetime.c:1.60   Fri Jan  5 09:34:47 2001
+++ php4/ext/standard/datetime.c        Tue Jan  9 20:01:02 2001
@@ -19,7 +19,7 @@
  */
 
 
-/* $Id: datetime.c,v 1.60 2001/01/05 17:34:47 dbeu Exp $ */
+/* $Id: datetime.c,v 1.61 2001/01/10 04:01:02 david Exp $ */
 
 
 #include "php.h"
@@ -255,8 +255,14 @@
                                break;
                        case 'F':               /* month, textual, full */
                        case 'l':               /* day (of the week), textual */
-                       case 'T':               /* timezone name */
                                size += 28;
+                               break;
+                       case 'T':               /* timezone name */
+#if HAVE_TM_ZONE
+                               size += strlen(ta->tm_zone);
+#else
+                               size += strlen(tzname[0]);
+#endif
                                break;
                        case 'Z':               /* timezone offset in seconds */
                                size += 6;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to