avoid the overhead of parsing just to get a 1-second span
authorChuck Hagenbuch <chuck@horde.org>
Fri, 22 May 2009 02:51:44 +0000 (22:51 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Fri, 22 May 2009 15:57:32 +0000 (11:57 -0400)
framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php

index da61cae..83e6410 100644 (file)
@@ -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);
     }