cvs: php4 /ext/standard datetime.c

From: Date: Thu, 18 Jan 2001 14:36:43 +0000
Subject: cvs: php4 /ext/standard datetime.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3681@lists.php.net to get a copy of this message
andrei Thu Jan 18 06:36:43 2001 EDT Modified files: /php4/ext/standard datetime.c Log: @- Fixed 'O' and 'r' flags of date() to have correct sign for timezone @ offset. (Andrei) Index: php4/ext/standard/datetime.c diff -u php4/ext/standard/datetime.c:1.64 php4/ext/standard/datetime.c:1.65 --- php4/ext/standard/datetime.c:1.64 Wed Jan 17 13:09:16 2001 +++ php4/ext/standard/datetime.c Thu Jan 18 06:36:43 2001 @@ -19,7 +19,7 @@ */ -/* $Id: datetime.c,v 1.64 2001/01/17 21:09:16 andrei Exp $ */ +/* $Id: datetime.c,v 1.65 2001/01/18 14:36:43 andrei Exp $ */ #include "php.h" @@ -433,7 +433,7 @@ #if HAVE_TM_GMTOFF sprintf(tmp_buff, "%c%02d%02d", (ta->tm_gmtoff < 0) ? '-' : '+', abs(ta->tm_gmtoff / 3600), abs( ta->tm_gmtoff % 3600)); #else - sprintf(tmp_buff, "%c%02d%02d", ((ta->tm_isdst ? timezone - 3600:timezone)<0)?'-':'+',abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs((ta->tm_isdst ? timezone - 3600 : timezone) % 3600)); + sprintf(tmp_buff, "%c%02d%02d", ((ta->tm_isdst ? timezone - 3600:timezone)>0)?'-':'+',abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs((ta->tm_isdst ? timezone - 3600 : timezone) % 3600)); #endif strcat(return_value->value.str.val, tmp_buff); break; @@ -493,7 +493,7 @@ ta->tm_hour, ta->tm_min, ta->tm_sec, - ((ta->tm_isdst ? timezone - 3600 : timezone) < 0) ? '-' : '+', + ((ta->tm_isdst ? timezone - 3600 : timezone) > 0) ? '-' : '+', abs((ta->tm_isdst ? timezone - 3600 : timezone) / 3600), abs((ta->tm_isdst ? timezone - 3600 : timezone) % 3600) );

« previous php.cvs (#3681) next »