Skip to content

Commit 30aeba2

Browse files
derickrweltling
authored andcommitted
Fixed ext/date tests due to changes in Olson database
(cherry picked from commit ca0bcf5)
1 parent 1bf53c4 commit 30aeba2

6 files changed

+66
-89
lines changed

ext/date/tests/010.phpt

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,8 @@ date_default_timezone_set('UTC');
88
echo "Done\n";
99
?>
1010
--EXPECTF--
11-
array(6) {
11+
array(5) {
1212
[0]=>
13-
array(3) {
14-
["dst"]=>
15-
bool(false)
16-
["offset"]=>
17-
int(0)
18-
["timezone_id"]=>
19-
string(16) "Antarctica/Troll"
20-
}
21-
[1]=>
2213
array(3) {
2314
["dst"]=>
2415
bool(false)
@@ -27,7 +18,7 @@ array(6) {
2718
["timezone_id"]=>
2819
string(13) "Etc/Universal"
2920
}
30-
[2]=>
21+
[1]=>
3122
array(3) {
3223
["dst"]=>
3324
bool(false)
@@ -36,7 +27,7 @@ array(6) {
3627
["timezone_id"]=>
3728
string(7) "Etc/UTC"
3829
}
39-
[3]=>
30+
[2]=>
4031
array(3) {
4132
["dst"]=>
4233
bool(false)
@@ -45,7 +36,7 @@ array(6) {
4536
["timezone_id"]=>
4637
string(8) "Etc/Zulu"
4738
}
48-
[4]=>
39+
[3]=>
4940
array(3) {
5041
["dst"]=>
5142
bool(false)
@@ -54,7 +45,7 @@ array(6) {
5445
["timezone_id"]=>
5546
string(3) "UTC"
5647
}
57-
[5]=>
48+
[4]=>
5849
array(3) {
5950
["dst"]=>
6051
bool(false)

ext/date/tests/DateTimeZone_getLocation.phpt

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
--TEST--
2-
DateTimeZone::getLocation -- timezone_location_get — Returns location information for a timezone
3-
public array DateTimeZone::getLocation ( void ) ;
2+
DateTimeZone::getLocation -- timezone_location_get — Returns location information for a timezone public array DateTimeZone::getLocation ( void ) ;
43
--CREDITS--
54
marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
65
--SKIPIF--
@@ -53,30 +52,9 @@ Array
5352
[comments] => %s
5453
)
5554
Array
56-
(
57-
[country_code] => %s
58-
[latitude] => %f
59-
[longitude] => %f
60-
[comments] =>
61-
)
62-
Array
6355
(
6456
[country_code] => %s
6557
[latitude] => %f
6658
[longitude] => %f
6759
[comments] => %s
6860
)
69-
Array
70-
(
71-
[country_code] => %s
72-
[latitude] => %f
73-
[longitude] => %f
74-
[comments] => %s
75-
)
76-
Array
77-
(
78-
[country_code] => %s
79-
[latitude] => %f
80-
[longitude] => %f
81-
[comments] =>
82-
)

ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ string(5) "array"
2929
int(%d)
3030

3131
-- Format a sample entry --
32-
array(11) {
32+
array(12) {
3333
[0]=>
3434
array(3) {
3535
["dst"]=>
36-
bool(true)
36+
bool(false)
3737
["offset"]=>
38-
int(-14400)
38+
int(32400)
3939
["timezone_id"]=>
40-
string(18) "America/Porto_Acre"
40+
string(18) "Australia/Adelaide"
4141
}
4242
[1]=>
4343
array(3) {
@@ -51,40 +51,49 @@ array(11) {
5151
[2]=>
5252
array(3) {
5353
["dst"]=>
54-
bool(true)
54+
bool(false)
5555
["offset"]=>
56-
int(-14400)
56+
int(32400)
5757
["timezone_id"]=>
58-
string(16) "America/Eirunepe"
58+
string(21) "Australia/Broken_Hill"
5959
}
6060
[3]=>
6161
array(3) {
6262
["dst"]=>
63-
bool(true)
63+
bool(false)
6464
["offset"]=>
65-
int(-14400)
65+
int(32400)
6666
["timezone_id"]=>
67-
string(18) "America/Rio_Branco"
67+
string(16) "Australia/Darwin"
6868
}
6969
[4]=>
7070
array(3) {
7171
["dst"]=>
72-
bool(true)
72+
bool(false)
7373
["offset"]=>
74-
int(-14400)
74+
int(32400)
7575
["timezone_id"]=>
76-
string(11) "Brazil/Acre"
76+
string(15) "Australia/North"
7777
}
7878
[5]=>
7979
array(3) {
8080
["dst"]=>
8181
bool(false)
8282
["offset"]=>
83-
int(34200)
83+
int(32400)
8484
["timezone_id"]=>
85-
string(13) "Asia/Jayapura"
85+
string(15) "Australia/South"
8686
}
8787
[6]=>
88+
array(3) {
89+
["dst"]=>
90+
bool(false)
91+
["offset"]=>
92+
int(32400)
93+
["timezone_id"]=>
94+
string(20) "Australia/Yancowinna"
95+
}
96+
[7]=>
8897
array(3) {
8998
["dst"]=>
9099
bool(false)
@@ -93,7 +102,7 @@ array(11) {
93102
["timezone_id"]=>
94103
string(21) "Australia/Broken_Hill"
95104
}
96-
[7]=>
105+
[8]=>
97106
array(3) {
98107
["dst"]=>
99108
bool(false)
@@ -102,7 +111,7 @@ array(11) {
102111
["timezone_id"]=>
103112
string(16) "Australia/Darwin"
104113
}
105-
[8]=>
114+
[9]=>
106115
array(3) {
107116
["dst"]=>
108117
bool(false)
@@ -111,7 +120,7 @@ array(11) {
111120
["timezone_id"]=>
112121
string(15) "Australia/North"
113122
}
114-
[9]=>
123+
[10]=>
115124
array(3) {
116125
["dst"]=>
117126
bool(false)
@@ -120,7 +129,7 @@ array(11) {
120129
["timezone_id"]=>
121130
string(15) "Australia/South"
122131
}
123-
[10]=>
132+
[11]=>
124133
array(3) {
125134
["dst"]=>
126135
bool(false)

ext/date/tests/bug45081.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ date.timezone=Asia/Singapore
55
--FILE--
66
<?php
77

8-
print strtotime('2008-05-23 00:00:00 SGT');
8+
print strtotime('2008-05-23 00:00:00 +08');
99
print "\n";
1010
print strtotime('2008-05-23 00:00:00');
1111

ext/date/tests/timezone_abbreviations_list_basic1.phpt

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ var_dump( $abbr["acst"] );
2626
--EXPECTF--
2727
*** Testing timezone_abbreviations_list() : basic functionality ***
2828
string(5) "array"
29-
int(%d)
29+
int(142)
3030

3131
-- Format a sample entry --
32-
array(11) {
32+
array(12) {
3333
[0]=>
3434
array(3) {
3535
["dst"]=>
36-
bool(true)
36+
bool(false)
3737
["offset"]=>
38-
int(-14400)
38+
int(32400)
3939
["timezone_id"]=>
40-
string(18) "America/Porto_Acre"
40+
string(18) "Australia/Adelaide"
4141
}
4242
[1]=>
4343
array(3) {
@@ -51,40 +51,49 @@ array(11) {
5151
[2]=>
5252
array(3) {
5353
["dst"]=>
54-
bool(true)
54+
bool(false)
5555
["offset"]=>
56-
int(-14400)
56+
int(32400)
5757
["timezone_id"]=>
58-
string(16) "America/Eirunepe"
58+
string(21) "Australia/Broken_Hill"
5959
}
6060
[3]=>
6161
array(3) {
6262
["dst"]=>
63-
bool(true)
63+
bool(false)
6464
["offset"]=>
65-
int(-14400)
65+
int(32400)
6666
["timezone_id"]=>
67-
string(18) "America/Rio_Branco"
67+
string(16) "Australia/Darwin"
6868
}
6969
[4]=>
7070
array(3) {
7171
["dst"]=>
72-
bool(true)
72+
bool(false)
7373
["offset"]=>
74-
int(-14400)
74+
int(32400)
7575
["timezone_id"]=>
76-
string(11) "Brazil/Acre"
76+
string(15) "Australia/North"
7777
}
7878
[5]=>
7979
array(3) {
8080
["dst"]=>
8181
bool(false)
8282
["offset"]=>
83-
int(34200)
83+
int(32400)
8484
["timezone_id"]=>
85-
string(13) "Asia/Jayapura"
85+
string(15) "Australia/South"
8686
}
8787
[6]=>
88+
array(3) {
89+
["dst"]=>
90+
bool(false)
91+
["offset"]=>
92+
int(32400)
93+
["timezone_id"]=>
94+
string(20) "Australia/Yancowinna"
95+
}
96+
[7]=>
8897
array(3) {
8998
["dst"]=>
9099
bool(false)
@@ -93,7 +102,7 @@ array(11) {
93102
["timezone_id"]=>
94103
string(21) "Australia/Broken_Hill"
95104
}
96-
[7]=>
105+
[8]=>
97106
array(3) {
98107
["dst"]=>
99108
bool(false)
@@ -102,7 +111,7 @@ array(11) {
102111
["timezone_id"]=>
103112
string(16) "Australia/Darwin"
104113
}
105-
[8]=>
114+
[9]=>
106115
array(3) {
107116
["dst"]=>
108117
bool(false)
@@ -111,7 +120,7 @@ array(11) {
111120
["timezone_id"]=>
112121
string(15) "Australia/North"
113122
}
114-
[9]=>
123+
[10]=>
115124
array(3) {
116125
["dst"]=>
117126
bool(false)
@@ -120,7 +129,7 @@ array(11) {
120129
["timezone_id"]=>
121130
string(15) "Australia/South"
122131
}
123-
[10]=>
132+
[11]=>
124133
array(3) {
125134
["dst"]=>
126135
bool(false)

ext/date/tests/timezone_name_from_abbr_basic1.phpt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ var_dump( timezone_name_from_abbr("EDT") );
2424
echo "-- Lookup with name and offset--\n";
2525
var_dump( timezone_name_from_abbr("ADT", -10800) );
2626
var_dump( timezone_name_from_abbr("ADT", 14400) );
27-
var_dump( timezone_name_from_abbr("AKTT", 14400) );
28-
var_dump( timezone_name_from_abbr("aktt", 18000) );
29-
var_dump( timezone_name_from_abbr("Aktt", 21600) );
30-
var_dump( timezone_name_from_abbr("AMST", -10800) );
31-
var_dump( timezone_name_from_abbr("amst", 180000) );
3227

3328
echo "-- Tests without valid name - uses gmtOffset and isdst to find match --\n";
3429
var_dump( timezone_name_from_abbr("", 3600, 1) );
@@ -51,12 +46,7 @@ string(13) "Europe/Berlin"
5146
string(16) "America/New_York"
5247
-- Lookup with name and offset--
5348
string(15) "America/Halifax"
54-
string(12) "Asia/Baghdad"
55-
string(11) "Asia/Aqtobe"
56-
string(11) "Asia/Aqtobe"
57-
string(11) "Asia/Aqtobe"
58-
string(17) "America/Boa_Vista"
59-
string(12) "Asia/Yerevan"
49+
string(15) "America/Halifax"
6050
-- Tests without valid name - uses gmtOffset and isdst to find match --
6151
string(13) "Europe/London"
6252
string(17) "America/Sao_Paulo"
@@ -65,4 +55,4 @@ string(15) "America/Halifax"
6555
-- Tests with invalid offsets --
6656
bool(false)
6757
bool(false)
68-
===DONE===
58+
===DONE===

0 commit comments

Comments
 (0)