show versions in MINFO
[awesomized/ext-ion] / tests / Timestamp / stringTZ.phpt
1 --TEST--
2 ion\Timestamp with TZ as string
3 --EXTENSIONS--
4 ion
5 --INI--
6 date.timezone=UTC
7 --FILE--
8 TEST
9 <?php
10 $ts = new ion\Timestamp(
11 precision: ion\Timestamp\Precision::MinTZ,
12 format: \ion\Timestamp\Format::Min,
13 datetime: "2022-02-28T11:40",
14 timezone: "Europe/Madrid",
15 );
16 var_dump($ts->getTimezone());
17 echo $ts, "\n";
18 echo $ts->setTimezone(new DateTimeZone(("America/Toronto"))), "\n";
19 ?>
20 DONE
21 --EXPECTF--
22 TEST
23 object(DateTimeZone)#%d (2) {
24 ["timezone_type"]=>
25 int(3)
26 ["timezone"]=>
27 string(13) "Europe/Madrid"
28 }
29 2022-02-28T11:40+01:00
30 2022-02-28T05:40-05:00
31 DONE