Со следующим кодом,
protected $token; /** @Column(name="assigneddate", type="datetime", columnDefinition="datetime") */ private $assigneddate; /** @Column(name="expirydate", type="datetime", columnDefinition="datetime") */ private $expirydate; /** @PreUpdate */ public function updated() { //$this->assigneddate = new \DateTime("now"); } public function __construct() { $this->expirydate = $this->expirydate = new \DateTime("now"); $this->assigneddate = $this->assigneddate = new \DateTime("now");
}
Как мне добавить 2 часа?