- function isbot() { return $this->bot; }
- function isns() { return (strpos($this->brand, 'Netscape') !== false); }
- function isns4() { return ((strpos($this->brand, 'Netscape') !== false) && (intval($this->version) == 4)); }
- function isie() { return $this->hasEngine('trident'); }
- function geckodate() { return (!is_null($this->getGeckoDate())?$this->getGeckoDate():0); }
- function geckobased() { return $this->hasEngine('gecko'); }
- function khtmlbased() { return $this->hasEngine('khtml'); }
+ public function getGeckoTime() {
+ if (!isset($this->uadata['geckotime'])) {
+ $this->uadata['geckotime'] = null;
+ if (!is_null($this->getGeckoDate())) {
+ $use_time = (strlen($this->getGeckoDate()) > 8);
+ $gd_str = substr($this->getGeckoDate(),0,4).'-'.substr($this->getGeckoDate(),4,2).'-'.substr($this->getGeckoDate(),6,2);
+ if ($use_time) {
+ $gd_str .= substr($this->getGeckoDate(),8,2).':00';
+ $old_tz = date_default_timezone_get();
+ date_default_timezone_set("America/Los_Angeles");
+ }
+ $this->uadata['geckotime'] = strtotime($gd_str);
+ if ($use_time) { date_default_timezone_set($old_tz); }
+ }
+ }
+ return $this->uadata['geckotime'];
+ }
+
+ public function isBot() { return $this->bot; }
+
+ public function isns() {
+ trigger_error(__CLASS__.'::'.__FUNCTION__.' is a deprecated function', E_USER_NOTICE);
+ return (strpos($this->brand, 'Netscape') !== false);
+ }
+ public function isns4() {
+ trigger_error(__CLASS__.'::'.__FUNCTION__.' is a deprecated function', E_USER_NOTICE);
+ return ((strpos($this->brand, 'Netscape') !== false) && (intval($this->version) == 4));
+ }
+ public function isie() {
+ trigger_error(__CLASS__.'::'.__FUNCTION__.' is a deprecated function', E_USER_NOTICE);
+ return $this->hasEngine('trident');
+ }
+ public function geckodate() {
+ trigger_error(__CLASS__.'::'.__FUNCTION__.' is a deprecated function', E_USER_NOTICE);
+ return (!is_null($this->getGeckoDate())?$this->getGeckoDate():0);
+ }
+ public function geckobased() {
+ trigger_error(__CLASS__.'::'.__FUNCTION__.' is a deprecated function', E_USER_NOTICE);
+ return $this->hasEngine('gecko');
+ }
+ public function khtmlbased() {
+ trigger_error(__CLASS__.'::'.__FUNCTION__.' is a deprecated function', E_USER_NOTICE);
+ return $this->hasEngine('khtml');
+ }