note 76216 modified in function.date-create by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 02:32:04 +0000 |
| Subject: | note 76216 modified in function.date-create by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-141967@lists.php.net to get a copy of this message | ||
If you want to create the DateTime object directly from a timestamp use this
<?php
$st = 1170288000 // a timestamp
$dt = new DateTime("@$st");
?>
See also: http://bugs.php.net/bug.php?id=40171
--was--
If you want to create the DateTime object directly from a timestamp use this
<?
$st = 1170288000 // a timestamp
$dt = new DateTime("@$st");
?>
See also: http://bugs.php.net/bug.php?id=40171
http://php.net/manual/en/function.date-create.php