blob: 72e78af5f3f0c38d30298f3dc98470bef6399646 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--TEST--
IntlDateFormatter::setTimeZone() bad args
--SKIPIF--
<?php
if (!extension_loaded('intl'))
die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
ini_set("intl.default_locale", "pt_PT");
ini_set("date.timezone", 'Atlantic/Azores');
$df = new IntlDateFormatter(NULL, 0, 0);
var_dump($df->setTimeZone(array()));
var_dump($df->setTimeZone('non existing timezone'));
?>
--EXPECTF--
Warning: Array to string conversion in %s on line %d
Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: No such time zone: 'Array' in %s on line %d
bool(false)
Warning: IntlDateFormatter::setTimeZone(): datefmt_set_timezone: No such time zone: 'non existing timezone' in %s on line %d
bool(false)
|