1--TEST--
2datefmt_get_timezone_id_code()
3--INI--
4date.timezone=Atlantic/Azores
5intl.error_level=E_WARNING
6--SKIPIF--
7<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
8--FILE--
9<?php
10
11/*
12 * Test for the datefmt_get_timezone_id  function
13 */
14
15
16function ut_main()
17{
18	$timezone_id_arr = array (
19		'America/New_York',
20		'US/Pacific',
21		'US/Central'
22	);
23
24	$res_str = '';
25
26	foreach( $timezone_id_arr as $timezone_id_entry )
27	{
28		$res_str .= "\nCreating IntlDateFormatter with timezone_id = $timezone_id_entry";
29		$fmt = ut_datefmt_create( "de-DE",  IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, $timezone_id_entry , IntlDateFormatter::GREGORIAN  );
30		$timezone_id = ut_datefmt_get_timezone_id( $fmt);
31		$res_str .= "\nAfter call to get_timezone_id :  timezone_id= $timezone_id";
32		$res_str .= "\n";
33	}
34
35	return $res_str;
36
37}
38
39include_once( 'ut_common.inc' );
40
41// Run the test
42ut_run();
43?>
44--EXPECT--
45Creating IntlDateFormatter with timezone_id = America/New_York
46After call to get_timezone_id :  timezone_id= America/New_York
47
48Creating IntlDateFormatter with timezone_id = US/Pacific
49After call to get_timezone_id :  timezone_id= US/Pacific
50
51Creating IntlDateFormatter with timezone_id = US/Central
52After call to get_timezone_id :  timezone_id= US/Central
53