Used when decoding an incoming date value from the client.
protected _parseDate ( string $ts ) : Horde_Date | boolean | ||
$ts | string | The timestamp |
return | Horde_Date | boolean | The Horde_Date or false if unable to decode. |
/** * Override parent class so we can normalize the Date object before * returning it. * * @param [type] $ts [description] * @return [type] [description] */ protected function _parseDate($ts) { $date = parent::_parseDate($ts); // @todo: Remove this in H6. if (empty($this->_device)) { return $date; } return $this->_device->normalizePoomContactsDates($date); }
/** * Override parent class so we can normalize the Date object before * returning it. * * @param string $ts The timestamp * * @return Horde_Date|boolean The Horde_Date object (UTC) or false if * unable to parse the date. */ protected function _parseDate($ts) { $date = parent::_parseDate($ts); // Since some clients send the date as YYYY-MM-DD only, the best we can // do is assume that it is in the same timezone as the user's default // timezone - so convert it to UTC and be done with it. if ($date->timezone != 'UTC') { $date->setTimezone('UTC'); } // @todo: Remove this in H6. if (empty($this->_device)) { return $date; } return $this->_device->normalizePoomContactsDates($date); }