PHP  
 PHP_5_5
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/intl/tests/dateformat_localtime.phpt ('datefmt_localtime_code() icu <= 4.2')

Script

1: <?php
2:
3:
/*
4:  * Test for the datefmt_localtime  function
5:  */
6:
7:
8:
function ut_main()
9: {
10:     
$locale_arr = array (
11:         
'en_US_CA'
12:     
);
13:     
14:     
$datetype_arr = array (
15:                 
IntlDateFormatter::FULL,
16:                 
IntlDateFormatter::LONG,
17:                 
IntlDateFormatter::MEDIUM,
18:                 
IntlDateFormatter::SHORT,
19:                 
IntlDateFormatter::NONE
20:         
);
21:
22:         
$res_str '';
23:
24:         
$datetype_arr = array (
25:                 
IntlDateFormatter::FULL,
26:                 
IntlDateFormatter::LONG,
27:                 
IntlDateFormatter::MEDIUM,
28:         );
29:
30:         
$res_str '';
31:
32:
33:         
$text_arr = array (
34:                 
"Thursday, December 18, 1969 8:49:59 AM PST",
35:                 
"June 18, 1969 8:49:59 AM ",
36:                 
"12/18/69 8:49 AM",
37:                 
"19691218 08:49 AM"
38:         
);
39:
40:         
$fmt1 ut_datefmt_create'en_US_CA'IntlDateFormatter::LONGIntlDateFormatter::LONG);
41:         
$fmt2 ut_datefmt_create'en_US_CA'IntlDateFormatter::MEDIUMIntlDateFormatter::MEDIUM);
42:         
$fmt3 ut_datefmt_create'en_US_CA'IntlDateFormatter::FULLIntlDateFormatter::FULL);
43:         
$fmt_array  = array(
44:                 
$fmt1 $fmt2 ,$fmt3
45:         
);
46:         
$fmt_desc_array  = array(
47:                 
"DateType::LONG, TimeType::LONG",
48:                 
"DateType::MEDIUM, TimeType::MEDIUM",
49:                 
"DateType::FULL, TimeType::FULL"
50:         
);
51:
52:     foreach( 
$text_arr as $text_entry){
53:                 
$res_str .= "\n-------------------------------\n";
54:                 
$res_str .= "\nInput text is : $text_entry";
55:         
$cnt =0;
56:
57:
58:                     foreach( 
$fmt_array as $fmt_entry ){
59:             
$res_str .= "\n------------";
60:             
$res_str .= "\nIntlDateFormatter : ".$fmt_desc_array[$cnt];
61:         
$parse_pos 0;
62:             
$cnt++;        
63:             
$parsed_arr ut_datefmt_localtime$fmt_entry $text_entry $parse_pos );
64:
65:                 if( 
$parsed_arr){
66:                     
$res_str .= "\n";
67:                     foreach( 
$parsed_arr as $key => $value){
68:                         
$res_str .= "$key : '$value' , ";
69:                     }
70:                 }
71:
/*
72:                 else{
73:                     //$res_str .= "No values found from LocaleTime parsing.";
74:                     $res_str .= "\tError : '".intl_get_error_message()."'";
75:                 }
76: */
77:             
}//end of for $fmt_array
78:         
}
79:
80:
81:     return 
$res_str;
82:
83: }
84:
85: include_once( 
'ut_common.inc' );
86:
87:
// Run the test
88:
ut_run();
89:
?>
90:

Expected

-------------------------------

Input text is : Thursday, December 18, 1969 8:49:59 AM PST
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL
tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '4' , tm_yday : '352' , tm_mon : '11' , tm_isdst : '0' , 
-------------------------------

Input text is : June 18, 1969 8:49:59 AM 
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '3' , tm_yday : '169' , tm_mon : '5' , tm_isdst : '%d' , 
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL
-------------------------------

Input text is : 12/18/69 8:49 AM
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL
-------------------------------

Input text is : 19691218 08:49 AM
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL

Output

Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334

Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334

Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334

Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334

Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334

Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334

-------------------------------

Input text is : Thursday, December 18, 1969 8:49:59 AM PST
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL
tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '4' , tm_yday : '352' , tm_mon : '11' , tm_isdst : '0' , 
-------------------------------

Input text is : June 18, 1969 8:49:59 AM 
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
tm_sec : '59' , tm_min : '49' , tm_hour : '8' , tm_year : '69' , tm_mday : '18' , tm_wday : '3' , tm_yday : '169' , tm_mon : '5' , tm_isdst : '0' , 
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL
-------------------------------

Input text is : 12/18/69 8:49 AM
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL
-------------------------------

Input text is : 19691218 08:49 AM
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL

Diff

001+ Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334
002+ 
003+ Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334
004+ 
005+ Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334
006+ 
007+ Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334
008+ 
009+ Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334
010+ 
011+ Warning: datefmt_create(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/php_gcov/PHP_5_5/ext/intl/tests/ut_common.inc on line 334
012+ 

 

Generated at Tue, 22 Apr 2014 03:58:31 +0000 (43 hours ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.