1--TEST--
2Cloning datefmt icu >= 4.8
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7include_once( 'ut_common.inc' );
8$GLOBALS['oo-mode'] = true;
9$res_str = '';
10/*
11 * Clone
12 */
13$start_pattern = 'dd-MM-YY';
14$fmt = ut_datefmt_create( "en-US",  IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern );
15
16$formatted = ut_datefmt_format($fmt,0);
17$res_str .= "\nResult of formatting timestamp=0 is :  \n$formatted";
18
19$fmt_clone = clone $fmt;
20ut_datefmt_set_pattern( $fmt , 'yyyy-DDD.hh:mm:ss z' );
21
22$formatted = ut_datefmt_format($fmt,0);
23$res_str .= "\nResult of formatting timestamp=0 is :  \n$formatted";
24$formatted = ut_datefmt_format($fmt_clone,0);
25$res_str .= "\nResult of clone formatting timestamp=0 is :  \n$formatted";
26
27echo $res_str;
28
29?>
30--EXPECT--
31Result of formatting timestamp=0 is :
3231-12-70
33Result of formatting timestamp=0 is :
341969-365.07:00:00 EST
35Result of clone formatting timestamp=0 is :
3631-12-70
37