public function setTimestamp($timestamp) { $timestamp = $this->_validate->apply($timestamp, 'string', array(new Filter\Length(4, 32)), 'timestamp', 'Timestamp'); if (!$this->_validate->hasError()) { if (is_numeric($timestamp)) { $timestamp = '@' . $timestamp; } $date = new DateTime($timestamp, new DateTimeZone('UTC')); $date->setTimezone($this->_registry['core.default_timezone']); $this->commitDate = $date->format(DateTime::SQL); } else { throw new Exception($this->_validate->getLastError()); } }