cvs: php4 /ext/calendar cal_unix.c

From: Date: Mon, 30 Oct 2000 16:13:04 +0000
Subject: cvs: php4 /ext/calendar cal_unix.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2357@lists.php.net to get a copy of this message
stas Mon Oct 30 08:13:04 2000 EDT Modified files: /php4/ext/calendar cal_unix.c Log: Don't try to work with negative timestamps # It returns the same day as for 0, which is wrong Index: php4/ext/calendar/cal_unix.c diff -u php4/ext/calendar/cal_unix.c:1.4 php4/ext/calendar/cal_unix.c:1.5 --- php4/ext/calendar/cal_unix.c:1.4 Mon Jun 5 12:47:39 2000 +++ php4/ext/calendar/cal_unix.c Mon Oct 30 08:13:03 2000 @@ -45,6 +45,10 @@ t = time(NULL); } + if(t < 0) { + RETURN_FALSE; + } + ta = php_localtime_r(&t, &tmbuf); jdate = GregorianToSdn(ta->tm_year+1900, ta->tm_mon+1,ta->tm_mday);

« previous php.cvs (#2357) next »