(PHP 5 >= 5.2.0)
DateTime::__construct — Returns new DateTime object
Returns new DateTime object.
String in a format accepted by strtotime(), defaults to "now".
Time zone of the time.
Emits Exception in case of an error.
Пример #1 DateTime::__construct() example
<?phpdate_default_timezone_set('Europe/London');$datetime = new DateTime('2008-08-03 14:52:10');echo $datetime->format(DATE_ATOM);?>