--TEST-- date OO interface --FILE-- format("Y-m-d H:i:s")); try { $d = new _d; var_dump($d->format("Y-m-d H:i:s")); } catch (Error $e) { echo $e->getMessage(),"\n"; } try { new DateTime("1am todax"); } catch (Exception $e) { echo $e->getMessage(),"\n"; } $t = new DateTimeZone("UTC"); var_dump($t->getName()); try { $t = new _t; var_dump($t->getName()); } catch (Error $e) { echo $e->getMessage(),"\n"; } try { new DateTimeZone("GottaFindThisOne"); } catch (Exception $e) { echo $e->getMessage(),"\n"; } $p = new _p; try { var_dump($p->getStartDate()); } catch (Error $e) { echo $e->getMessage(),"\n"; } try { var_dump($p->getDateInterval()); } catch (Error $e) { echo $e->getMessage(),"\n"; } echo "DONE\n"; ?> --EXPECTF-- string(19) "%d-%d-%d %d:%d:%d" The DateTime object has not been correctly initialized by its constructor DateTime::__construct(): Failed to parse time string (1am todax) at position 4 (t): The timezone could not be found in the database string(3) "UTC" The DateTimeZone object has not been correctly initialized by its constructor DateTimeZone::__construct(): Unknown or bad timezone (GottaFindThisOne) The DatePeriod object has not been correctly initialized by its constructor The DatePeriod object has not been correctly initialized by its constructor DONE