5 date_default_timezone_set('UTC');
6 class _d extends DateTime {
7 function __construct() {
10 class _t extends DateTimeZone {
11 function __construct() {
16 var_dump($d->format("Y-m-d H:i:s"));
19 var_dump($d->format("Y-m-d H:i:s"));
22 new DateTime("1am todax");
23 } catch (Exception $e) {
24 echo $e->getMessage(),"\n";
27 $t = new DateTimeZone("UTC");
28 var_dump($t->getName());
31 var_dump($t->getName());
34 new DateTimeZone("GottaFindThisOne");
35 } catch (Exception $e) {
36 echo $e->getMessage(),"\n";
42 string(19) "%d-%d-%d %d:%d:%d"
44 Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %soo_001.php on line %d
46 DateTime::__construct(): Failed to parse time string (1am todax) at position 4 (t): The timezone could not be found in the database
49 Warning: DateTimeZone::getName(): The DateTimeZone object has not been correctly initialized by its constructor in %soo_001.php on line %d
51 DateTimeZone::__construct(): Unknown or bad timezone (GottaFindThisOne)