1--TEST--
2IntlCalendar::createInstance() basic test
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6	die('skip intl extension not enabled');
7if (version_compare(INTL_ICU_VERSION, '4.8') < 0)
8	die('skip for ICU 4.8+');
9--FILE--
10<?php
11ini_set("intl.error_level", E_WARNING);
12ini_set("intl.default_locale", "nl");
13
14date_default_timezone_set('Europe/Amsterdam');
15
16$cal = IntlCalendar::createInstance();
17print_R($cal->getTimeZone());
18print_R($cal->getLocale(Locale::ACTUAL_LOCALE));
19echo "\n";
20print_R($cal->getType());
21echo "\n";
22
23$timeMillis = $cal->getTime();
24$time = time();
25
26var_dump(abs($timeMillis - $time * 1000) < 2000);
27
28?>
29==DONE==
30--EXPECTF--
31IntlTimeZone Object
32(
33    [valid] => 1
34    [id] => Europe/Amsterdam
35    [rawOffset] => 3600000
36    [currentOffset] => %d
37)
38nl
39gregorian
40bool(true)
41==DONE==
42