Re: cvs: php-src /ext/standard datetime.c
| From: | Andi Gutmans | Date: | Thu, 01 Apr 2004 08:40:59 +0000 |
| Subject: | Re: cvs: php-src /ext/standard datetime.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-26901@lists.php.net to get a copy of this message | ||
Not very important, but a good way of fixing this would to probably do a configure check and see if it works/crashes. This would cover all UNIX systems. I checked the standard and behavior of negative timestamps is undefined so it could be nice if we at least do a sanity check on the target machine to see if it looks like it works.
Andi
At 05:57 PM 3/31/2004 +0000, Hartmut Holzgraefe wrote:
hholzgra Wed Mar 31 12:57:33 2004 EDTModified files:/php-src/ext/standard datetime.cLog: disallow negative timestamps on windows only http://cvs.php.net/diff.php/php-src/ext/standard/datetime.c?r1=1.119&r2=1.120&ty=u Index: php-src/ext/standard/datetime.c diff -u php-src/ext/standard/datetime.c:1.119 php-src/ext/standard/datetime.c:1.120--- php-src/ext/standard/datetime.c:1.119 Sun Mar 28 10:03:56 2004 +++ php-src/ext/standard/datetime.c Wed Mar 31 12:57:33 2004@@ -18,7 +18,7 @@+----------------------------------------------------------------------+*/ -/* $Id: datetime.c,v 1.119 2004/03/28 15:03:56 rasmus Exp $ */ +/* $Id: datetime.c,v 1.120 2004/03/31 17:57:33 hholzgra Exp $ */ #include "php.h" #include "zend_operators.h" @@ -1017,9 +1017,11 @@if (Z_STRLEN_PP(format_arg)==0) { RETURN_FALSE; }+#ifdef PHP_WIN32if (timestamp < 0) { RETURN_FALSE; }+#endifformat = Z_STRVAL_PP(format_arg); if (gm) { ta = php_gmtime_r(×tamp, &tmbuf);-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php