????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.191.146.8 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/intl/tests/ |
Upload File : |
--TEST-- datefmt_set_timezone_id_code() icu >= 4.8 --INI-- date.timezone=Atlantic/Azores --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> <?php if(version_compare(INTL_ICU_VERSION, '4.8') < 0) print 'skip'; ?> <?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> --FILE-- <?php ini_set("intl.error_level", E_WARNING); ini_set("error_reporting", ~E_DEPRECATED); /* * Test for the datefmt_set_timezone_id function */ function ut_main() { $timezone_id_arr = array ( 'America/New_York', 'America/Los_Angeles', 'America/Chicago', 'CN' ); $timestamp_entry = 0; $res_str = ''; $fmt = ut_datefmt_create( "en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'US/Pacific' , IntlDateFormatter::GREGORIAN ); $timezone_id = ut_datefmt_get_timezone_id( $fmt ); $res_str .= "\nAfter creation of the dateformatter : timezone_id= $timezone_id\n"; foreach( $timezone_id_arr as $timezone_id_entry ) { $res_str .= "-----------"; $res_str .= "\nTrying to set timezone_id= $timezone_id_entry"; ut_datefmt_set_timezone_id( $fmt , $timezone_id_entry ); $timezone_id = ut_datefmt_get_timezone_id( $fmt ); $res_str .= "\nAfter call to set_timezone_id : timezone_id= $timezone_id"; $formatted = ut_datefmt_format( $fmt, 0); $res_str .= "\nFormatting timestamp=0 resulted in $formatted"; $formatted = ut_datefmt_format( $fmt, 3600); $res_str .= "\nFormatting timestamp=3600 resulted in $formatted"; $res_str .= "\n"; } return $res_str; } include_once( 'ut_common.inc' ); // Run the test ut_run(); ?> --EXPECTF-- Warning: IntlDateFormatter::setTimeZoneId(): datefmt_set_timezone: no such time zone: 'CN' in %s on line %d Warning: datefmt_set_timezone_id(): datefmt_set_timezone: no such time zone: 'CN' in %s on line %d After creation of the dateformatter : timezone_id= US/Pacific ----------- Trying to set timezone_id= America/New_York After call to set_timezone_id : timezone_id= America/New_York Formatting timestamp=0 resulted in Wednesday, December 31, 1969 7:00:00 PM Eastern Standard Time Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 8:00:00 PM Eastern Standard Time ----------- Trying to set timezone_id= America/Los_Angeles After call to set_timezone_id : timezone_id= America/Los_Angeles Formatting timestamp=0 resulted in Wednesday, December 31, 1969 4:00:00 PM Pacific Standard Time Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 5:00:00 PM Pacific Standard Time ----------- Trying to set timezone_id= America/Chicago After call to set_timezone_id : timezone_id= America/Chicago Formatting timestamp=0 resulted in Wednesday, December 31, 1969 6:00:00 PM Central Standard Time Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 7:00:00 PM Central Standard Time ----------- Trying to set timezone_id= CN After call to set_timezone_id : timezone_id= America/Chicago Formatting timestamp=0 resulted in Wednesday, December 31, 1969 6:00:00 PM Central Standard Time Formatting timestamp=3600 resulted in Wednesday, December 31, 1969 7:00:00 PM Central Standard Time