1--TEST--
2Test new DateTime() : basic functionality
3--FILE--
4<?php
5//Set the default time zone
6date_default_timezone_set("Europe/London");
7
8echo "*** Testing new DateTime() : basic functionality ***\n";
9
10var_dump( new DateTime('') );
11
12var_dump( new DateTime("GMT") );
13var_dump( new DateTime("2005-07-14 22:30:41") );
14var_dump( new DateTime("2005-07-14 22:30:41 GMT") );
15
16?>
17--EXPECTF--
18*** Testing new DateTime() : basic functionality ***
19object(DateTime)#%d (3) {
20  ["date"]=>
21  string(%d) "%s"
22  ["timezone_type"]=>
23  int(3)
24  ["timezone"]=>
25  string(13) "Europe/London"
26}
27object(DateTime)#%d (3) {
28  ["date"]=>
29  string(%d) "%s"
30  ["timezone_type"]=>
31  int(2)
32  ["timezone"]=>
33  string(3) "GMT"
34}
35object(DateTime)#%d (3) {
36  ["date"]=>
37  string(26) "2005-07-14 22:30:41.000000"
38  ["timezone_type"]=>
39  int(3)
40  ["timezone"]=>
41  string(13) "Europe/London"
42}
43object(DateTime)#%d (3) {
44  ["date"]=>
45  string(26) "2005-07-14 22:30:41.000000"
46  ["timezone_type"]=>
47  int(2)
48  ["timezone"]=>
49  string(3) "GMT"
50}
51