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