1--TEST--
2IntlTimeZone::getWindowsID basic test
3--EXTENSIONS--
4intl
5--SKIPIF--
6<?php if (version_compare(INTL_ICU_VERSION, '58.1') < 0) die('skip for ICU >= 58.1'); ?>
7--FILE--
8<?php
9
10$tzs = array(
11  'America/Bogota',
12  'America/Havana',
13  'America/Indiana/Knox',
14  'America/Los_Angeles',
15  'Azeroth/Kalimdor/Durotar',
16  'Africa/Casablanca',
17  'Asia/Singapore',
18  'Australia/Perth',
19  'Europe/London',
20  'Europe/Istanbul',
21);
22
23foreach ($tzs as $tz) {
24  var_dump(IntlTimeZone::getWindowsID($tz));
25  if (intl_get_error_code() != U_ZERO_ERROR) {
26    echo "Error: ", intl_get_error_message(), "\n";
27  }
28}
29?>
30--EXPECT--
31string(24) "SA Pacific Standard Time"
32string(18) "Cuba Standard Time"
33string(21) "Central Standard Time"
34string(21) "Pacific Standard Time"
35bool(false)
36Error: intltz_get_windows_id: Unknown system timezone: U_ILLEGAL_ARGUMENT_ERROR
37string(21) "Morocco Standard Time"
38string(23) "Singapore Standard Time"
39string(26) "W. Australia Standard Time"
40string(17) "GMT Standard Time"
41string(20) "Turkey Standard Time"
42