__construct() public method

Creates a new date. If no parameters are given, the current time is used.
public __construct ( integer $sec, integer $usec )
$sec integer Number of seconds since January 1st, 1970
$usec integer Microseconds
Esempio n. 1
0
 public function __construct($date = null)
 {
     if ($date instanceof \DateTime) {
         $date = $date->getTimestamp();
     }
     parent::__construct($date);
 }