PHP  
 PHP_5_6
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_parse_localtime_parsepos.phpt ('datefmt_parse_localtime() with parse pos icu <= 4.2')

Script

1: <?php
2:
3:
/*
4:  * Test for the datefmt_parse_localtime  function with parse pos
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:         );
19:
20:         
$res_str '';
21:
22:
23:     
$text_arr = array (
24:         
"Thursday, December 18, 1969 8:49:59 AM PST",
25:         
"June 18, 1969 8:49:59 AM ",
26:         
"12/18/69 8:49 AM",
27:         
"19691218 08:49 AM"
28:     
);
29:
30:     
$fmt1 ut_datefmt_create'en_US_CA'IntlDateFormatter::LONGIntlDateFormatter::LONG);
31:     
$fmt2 ut_datefmt_create'en_US_CA'IntlDateFormatter::MEDIUMIntlDateFormatter::MEDIUM);
32:     
$fmt3 ut_datefmt_create'en_US_CA'IntlDateFormatter::FULLIntlDateFormatter::FULL);
33:     
$fmt_array  = array(
34:         
$fmt1 $fmt2 ,$fmt3 
35:     
);
36:     
$fmt_desc_array  = array(
37:         
"DateType::LONG, TimeType::LONG",
38:         
"DateType::MEDIUM, TimeType::MEDIUM",
39:         
"DateType::FULL, TimeType::FULL"
40:     
);
41:
42:     foreach( 
$text_arr as $text_entry){
43:                 
$res_str .= "\n-------------------------------\n";
44:                 
$res_str .= "\nInput text is : $text_entry";
45:         
$cnt =0;
46:                 foreach( 
$fmt_array as $fmt_entry ){
47:             
$res_str .= "\n------------";
48:             
$res_str .= "\nIntlDateFormatter : ".$fmt_desc_array[$cnt];
49:             
$cnt++;        
50:             
$parsed_arr ut_datefmt_localtime$fmt_entry $text_entry);
51:
52:                 if( 
$parsed_arr){
53:                     
$res_str .= "\n";
54:                     foreach( 
$parsed_arr as $key => $value){
55:                         
$res_str .= "$key : '$value' , ";
56:                     }
57:                 }
58:                 else{
59:                     
//$res_str .= "No values found from LocaleTime parsing.";
60:                     
$res_str .= "\tError : '".intl_get_error_message()."'";
61:                 }
62:
63:         }
64:         }
65:
66:
67:     return 
$res_str;
68:
69: }
70:
71: include_once( 
'ut_common.inc' );
72:
73:
// Run the test
74:
ut_run();
75:
?>
76:

Expected

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

Input text is : Thursday, December 18, 1969 8:49:59 AM PST
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
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	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
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	Error : 'Date parsing failed: U_PARSE_ERROR'
-------------------------------

Input text is : 12/18/69 8:49 AM
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL	Error : 'Date parsing failed: U_PARSE_ERROR'
-------------------------------

Input text is : 19691218 08:49 AM
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL	Error : 'Date parsing failed: U_PARSE_ERROR'

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_6/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_6/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_6/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_6/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_6/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_6/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	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
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	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
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	Error : 'Date parsing failed: U_PARSE_ERROR'
-------------------------------

Input text is : 12/18/69 8:49 AM
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL	Error : 'Date parsing failed: U_PARSE_ERROR'
-------------------------------

Input text is : 19691218 08:49 AM
------------
IntlDateFormatter : DateType::LONG, TimeType::LONG	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::MEDIUM, TimeType::MEDIUM	Error : 'Date parsing failed: U_PARSE_ERROR'
------------
IntlDateFormatter : DateType::FULL, TimeType::FULL	Error : 'Date parsing failed: U_PARSE_ERROR'

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_6/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_6/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_6/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_6/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_6/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_6/ext/intl/tests/ut_common.inc on line 334
012+ 

 

Generated at Wed, 10 Dec 2014 19:30:08 +0000 (10 days ago)

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