cvs: php-src /ext/date/lib parse_tz.c
| From: | Derick Rethans | Date: | Sat, 18 Jun 2005 11:58:20 +0000 |
| Subject: | cvs: php-src /ext/date/lib parse_tz.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-32366@lists.php.net to get a copy of this message | ||
derick Sat Jun 18 07:58:20 2005 EDT
Modified files:
/php-src/ext/date/lib parse_tz.c
Log:
- If the ts is smaller than the first transition time, use the last one
in the list.
#- This seems consistent with how "zdump" works, although I'm not 100% sure if
# it's correct.
http://cvs.php.net/diff.php/php-src/ext/date/lib/parse_tz.c?r1=1.10&r2=1.11&ty=u
Index: php-src/ext/date/lib/parse_tz.c
diff -u php-src/ext/date/lib/parse_tz.c:1.10 php-src/ext/date/lib/parse_tz.c:1.11
--- php-src/ext/date/lib/parse_tz.c:1.10 Sat Jun 18 07:15:29 2005
+++ php-src/ext/date/lib/parse_tz.c Sat Jun 18 07:58:18 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: parse_tz.c,v 1.10 2005/06/18 11:15:29 derick Exp $ */
+/* $Id: parse_tz.c,v 1.11 2005/06/18 11:58:18 derick Exp $ */
#include <timelib_config.h>
@@ -228,6 +228,9 @@
return NULL;
}
+ if (ts < tz->trans[0]) {
+ return &(tz->type[tz->trans_idx[tz->timecnt - 1]]);
+ }
for (i = 0; i < tz->timecnt; i++) {
if (ts < tz->trans[i]) {
return &(tz->type[tz->trans_idx[i - 1]]);