From: Chuck Hagenbuch Date: Fri, 22 May 2009 02:51:44 +0000 (-0400) Subject: avoid the overhead of parsing just to get a 1-second span X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=19df76e89c2194dcb7d6ce5efc880162db97c416;p=horde.git avoid the overhead of parsing just to get a 1-second span --- diff --git a/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php b/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php index da61cae74..83e641087 100644 --- a/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php +++ b/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php @@ -450,7 +450,7 @@ class Horde_Date_Parser_Locale_Base public function handle_s_r_p($tokens, $options) { - $span = $this->parse('this second', array('guess' => false, 'now' => $this->now)); + $span = new Horde_Date_Span($this->now, $this->now->add(1)); return $this->handle_srp($tokens, $span, $options); }