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