]> granicus.if.org Git - php/commitdiff
- Fixed a few test cases.
authorDerick Rethans <derick@php.net>
Sun, 28 Nov 2010 13:41:06 +0000 (13:41 +0000)
committerDerick Rethans <derick@php.net>
Sun, 28 Nov 2010 13:41:06 +0000 (13:41 +0000)
ext/date/tests/010.phpt
ext/date/tests/bug33415-2.phpt
ext/date/tests/bug52342.phpt
ext/date/tests/timezone_abbreviations_list_basic1.phpt

index 74b2b060e03d1645da2f0809b3300c444a7c47eb..aad5b70128ddc0467e48e6c2add11db2b0de79ae 100644 (file)
@@ -4,649 +4,82 @@ timezone_abbreviations_list() tests
 <?php
 date_default_timezone_set('UTC');
   $timezone_abbreviations = timezone_abbreviations_list();
-  var_dump($timezone_abbreviations["est"]);
+  var_dump($timezone_abbreviations["utc"]);
   echo "Done\n";
 ?>
 --EXPECTF--
-array(71) {
+array(8) {
   [0]=>
   array(3) {
     ["dst"]=>
     bool(false)
     ["offset"]=>
-    int(-18000)
+    int(0)
     ["timezone_id"]=>
-    string(16) "America/New_York"
+    string(13) "Etc/Universal"
   }
   [1]=>
   array(3) {
     ["dst"]=>
     bool(false)
     ["offset"]=>
-    int(-18000)
+    int(0)
     ["timezone_id"]=>
-    string(15) "America/Antigua"
+    string(7) "Etc/UTC"
   }
   [2]=>
   array(3) {
     ["dst"]=>
     bool(false)
     ["offset"]=>
-    int(-18000)
+    int(0)
     ["timezone_id"]=>
-    string(16) "America/Atikokan"
+    string(8) "Etc/Zulu"
   }
   [3]=>
   array(3) {
     ["dst"]=>
     bool(false)
     ["offset"]=>
-    int(-18000)
+    int(0)
     ["timezone_id"]=>
-    string(21) "America/Cambridge_Bay"
+    string(3) "GMT"
   }
   [4]=>
   array(3) {
     ["dst"]=>
     bool(false)
     ["offset"]=>
-    int(-18000)
+    int(0)
     ["timezone_id"]=>
-    string(14) "America/Cancun"
+    string(9) "Universal"
   }
   [5]=>
   array(3) {
     ["dst"]=>
     bool(false)
     ["offset"]=>
-    int(-18000)
+    int(0)
     ["timezone_id"]=>
-    string(14) "America/Cayman"
+    string(3) "UTC"
   }
   [6]=>
   array(3) {
     ["dst"]=>
     bool(false)
     ["offset"]=>
-    int(-18000)
+    int(0)
     ["timezone_id"]=>
-    string(15) "America/Chicago"
+    string(4) "Zulu"
   }
   [7]=>
   array(3) {
     ["dst"]=>
     bool(false)
     ["offset"]=>
-    int(-18000)
+    int(0)
     ["timezone_id"]=>
-    string(21) "America/Coral_Harbour"
-  }
-  [8]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(15) "America/Detroit"
-  }
-  [9]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(18) "America/Fort_Wayne"
-  }
-  [10]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(18) "America/Grand_Turk"
-  }
-  [11]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(28) "America/Indiana/Indianapolis"
-  }
-  [12]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(20) "America/Indiana/Knox"
-  }
-  [13]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(23) "America/Indiana/Marengo"
-  }
-  [14]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(26) "America/Indiana/Petersburg"
-  }
-  [15]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(21) "America/Indiana/Vevay"
-  }
-  [16]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(25) "America/Indiana/Vincennes"
-  }
-  [17]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(23) "America/Indiana/Winamac"
-  }
-  [18]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(20) "America/Indianapolis"
-  }
-  [19]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(15) "America/Iqaluit"
-  }
-  [20]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(15) "America/Jamaica"
-  }
-  [21]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(27) "America/Kentucky/Louisville"
-  }
-  [22]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(27) "America/Kentucky/Monticello"
-  }
-  [23]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(15) "America/Knox_IN"
-  }
-  [24]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(18) "America/Louisville"
-  }
-  [25]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(15) "America/Managua"
-  }
-  [26]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(17) "America/Menominee"
-  }
-  [27]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(14) "America/Merida"
-  }
-  [28]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(16) "America/Montreal"
-  }
-  [29]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(14) "America/Nassau"
-  }
-  [30]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(15) "America/Nipigon"
-  }
-  [31]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(14) "America/Panama"
-  }
-  [32]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(19) "America/Pangnirtung"
-  }
-  [33]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(22) "America/Port-au-Prince"
-  }
-  [34]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(20) "America/Rankin_Inlet"
-  }
-  [35]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(21) "America/Santo_Domingo"
-  }
-  [36]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(19) "America/Thunder_Bay"
-  }
-  [37]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(15) "America/Toronto"
-  }
-  [38]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(14) "Canada/Eastern"
-  }
-  [39]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(3) "EST"
-  }
-  [40]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(7) "EST5EDT"
-  }
-  [41]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(7) "Jamaica"
-  }
-  [42]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(10) "US/Central"
-  }
-  [43]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(15) "US/East-Indiana"
-  }
-  [44]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(10) "US/Eastern"
-  }
-  [45]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(17) "US/Indiana-Starke"
-  }
-  [46]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(-18000)
-    ["timezone_id"]=>
-    string(11) "US/Michigan"
-  }
-  [47]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(13) "Australia/ACT"
-  }
-  [48]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(18) "Australia/Brisbane"
-  }
-  [49]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(18) "Australia/Canberra"
-  }
-  [50]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(16) "Australia/Currie"
-  }
-  [51]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(16) "Australia/Hobart"
-  }
-  [52]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(18) "Australia/Lindeman"
-  }
-  [53]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(19) "Australia/Melbourne"
-  }
-  [54]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(13) "Australia/NSW"
-  }
-  [55]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(20) "Australia/Queensland"
-  }
-  [56]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(16) "Australia/Sydney"
-  }
-  [57]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(18) "Australia/Tasmania"
-  }
-  [58]=>
-  array(3) {
-    ["dst"]=>
-    bool(false)
-    ["offset"]=>
-    int(36000)
-    ["timezone_id"]=>
-    string(18) "Australia/Victoria"
-  }
-  [59]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(19) "Australia/Melbourne"
-  }
-  [60]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(13) "Australia/ACT"
-  }
-  [61]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(18) "Australia/Brisbane"
-  }
-  [62]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(18) "Australia/Canberra"
-  }
-  [63]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(16) "Australia/Currie"
-  }
-  [64]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(16) "Australia/Hobart"
-  }
-  [65]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(18) "Australia/Lindeman"
-  }
-  [66]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(13) "Australia/NSW"
-  }
-  [67]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(20) "Australia/Queensland"
-  }
-  [68]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(16) "Australia/Sydney"
-  }
-  [69]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(18) "Australia/Tasmania"
-  }
-  [70]=>
-  array(3) {
-    ["dst"]=>
-    bool(true)
-    ["offset"]=>
-    int(39600)
-    ["timezone_id"]=>
-    string(18) "Australia/Victoria"
+    string(3) "UTC"
   }
 }
 Done
index a1e5930b5ff52b40c09363426431b63618143af7..9ea537a9f85639a3e382aacad5bdc1d7e815b45a 100644 (file)
@@ -250,8 +250,8 @@ wanted=Sunday            00:30:00
 
 TZ=Pacific/Truk - Is it OK for this to be 10 AM?  Note: does not
 appear to have a DST or timezone transition.
-tStamp=Thursday 1970-01-01 17:17:17 TRUT 0
-result=Tuesday 1970-01-06 00:00:00 TRUT 0
+tStamp=Thursday 1970-01-01 17:17:17 CHUT 0
+result=Tuesday 1970-01-06 00:00:00 CHUT 0
 wanted=Tuesday            00:00:00
 
 TZ=Pacific/Ponape - Is it OK for this to be 11 AM?  Note: does
index 1f410c70ae3a484efe562f054b05aa3a33aa5182..45534a23da8fb864c3669378745c1d68b3291605 100644 (file)
@@ -16,7 +16,7 @@ echo $from->getTimestamp(), "\n"; //B
 echo date('d.m.Y H:i', $from->getTimestamp()), "\n"; //C
 ?>
 --EXPECT--
-12.07.2010
+12.07.2010 00:00
 1278885600
 12.07.2010 00:00
 1278885600
index 6fc3480153b9556eead2a5caac3074868e657bfa..845a69c34f5c84b99d9b3d6239facb2fcf28e489 100644 (file)
@@ -26,7 +26,7 @@ var_dump( $abbr["acst"] );
 --EXPECT--
 *** Testing timezone_abbreviations_list() : basic functionality ***
 string(5) "array"
-int(338)
+int(399)
 
 -- Format a sample entry --
 array(4) {
@@ -67,4 +67,4 @@ array(4) {
     string(11) "Brazil/Acre"
   }
 }
-===DONE===
\ No newline at end of file
+===DONE===