(PHP 5 >= 5.2.0)
date_create — Returns new DateTime object
String in a format accepted by strtotime(), defaults to "now".
Time zone of the time.
Returns DateTime object on success or FALSE on failure.
Пример #1 date_create() example
<?phpdate_default_timezone_set('Europe/London');$datetime = date_create('2008-08-03 14:52:10');echo date_format($datetime, DATE_ATOM);?>
Результат выполнения данного примера:
2008-08-03T14:52:10+01:00