]> granicus.if.org Git - php/commitdiff
- Fixed a problem where the timestamp we are looking up a TZ info structure for
authorDerick Rethans <derick@php.net>
Sat, 18 Jun 2005 11:15:29 +0000 (11:15 +0000)
committerDerick Rethans <derick@php.net>
Sat, 18 Jun 2005 11:15:29 +0000 (11:15 +0000)
  was in the last record in the tz database.
- Fixed problem in test case.

ext/date/lib/parse_tz.c
ext/date/tests/bug27780.phpt

index 4591c8f10f707e2c5057752512736abf644fa8b8..e88f3b2fe5d01ca699cd71be21bc5deb2b7204ac 100644 (file)
@@ -233,7 +233,7 @@ static ttinfo* fetch_timezone_offset(timelib_tzinfo *tz, timelib_sll ts)
                        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)
index 1c10340d479adc391c79e5d98979840dfd3dd627..f1e6eb67bd9e9a155c4f52806651d5c7900b41b5 100644 (file)
@@ -99,8 +99,8 @@ Asia/Singapore
 
 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]