cvs: php4 /ext/standard datetime.c

From: Date: Wed, 10 Jan 2001 04:01:02 +0000
Subject: cvs: php4 /ext/standard datetime.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3536@lists.php.net to get a copy of this message
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;

« previous php.cvs (#3536) next »