cvs: php-src /ext/date/lib parse_tz.c /ext/date/tests bug27780.phpt

From: Date: Sat, 18 Jun 2005 11:15:29 +0000
Subject: cvs: php-src /ext/date/lib parse_tz.c /ext/date/tests bug27780.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-32365@lists.php.net to get a copy of this message
derick Sat Jun 18 07:15:29 2005 EDT Modified files: /php-src/ext/date/lib parse_tz.c /php-src/ext/date/tests bug27780.phpt Log: - Fixed a problem where the timestamp we are looking up a TZ info structure for was in the last record in the tz database. - Fixed problem in test case. http://cvs.php.net/diff.php/php-src/ext/date/lib/parse_tz.c?r1=1.9&r2=1.10&ty=u Index: php-src/ext/date/lib/parse_tz.c diff -u php-src/ext/date/lib/parse_tz.c:1.9 php-src/ext/date/lib/parse_tz.c:1.10 --- php-src/ext/date/lib/parse_tz.c:1.9 Fri Jun 17 10:54:00 2005 +++ php-src/ext/date/lib/parse_tz.c Sat Jun 18 07:15:29 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_tz.c,v 1.9 2005/06/17 14:54:00 derick Exp $ */ +/* $Id: parse_tz.c,v 1.10 2005/06/18 11:15:29 derick Exp $ */ #include <timelib_config.h> @@ -233,7 +233,7 @@ return &(tz->type[tz->trans_idx[i - 1]]); } } - return NULL; + return &(tz->type[tz->trans_idx[tz->timecnt - 1]]); } static tlinfo* fetch_leaptime_offset(timelib_tzinfo *tz, timelib_sll ts) http://cvs.php.net/diff.php/php-src/ext/date/tests/bug27780.phpt?r1=1.1&r2=1.2&ty=u Index: php-src/ext/date/tests/bug27780.phpt diff -u php-src/ext/date/tests/bug27780.phpt:1.1 php-src/ext/date/tests/bug27780.phpt:1.2 --- php-src/ext/date/tests/bug27780.phpt:1.1 Thu Jun 16 13:35:08 2005 +++ php-src/ext/date/tests/bug27780.phpt Sat Jun 18 07:15:29 2005 @@ -99,8 +99,8 @@ America/Sao_Paulo 1076810399 [2004-02-14 23:59:59 BRST] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +59 seconds] -1076810400 [2004-02-14 23:00:00 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds] -1076810401 [2004-02-14 23:00:01 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds] +1076814000 [2004-02-15 00:00:00 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +60 seconds] +1076814001 [2004-02-15 00:00:01 BRT] [2004-04-07 00:00:00 -2 months +7 days +23 hours +59 minutes +61 seconds] 1079492400 [2004-03-17 00:00:00 BRT] [2004-04-07 00:00:00 -21 days] 1080356400 [2004-03-27 00:00:00 BRT] [2004-04-07 00:00:00 11 days ago] 1080450000 [2004-03-28 02:00:00 BRT] [2004-04-07 00:00:00 -10 day +2 hours]

« previous php.cvs (#32365) next »