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