/** * Set the updated_at value. */ protected function setUpdatedAt() { // Convert created_at back to GMT for saving if (isset($this->created_at)) { $this->created_at = Time::localToGmt($this->created_at); } // Set updated at if (!isset($this->updated_at) or $this->updated_at === null) { $this->updated_at = 'NOW()'; } }
/** * Date localization method * * @param string $format * @param mixed $timestamp */ public function date($format, $timestamp = null) { return Time::date($format, $timestamp); }