From dbd93f80ac3a1705ec8acfc8ae41026eba49fe82 Mon Sep 17 00:00:00 2001 From: robocoder Date: Sat, 8 Oct 2011 21:08:16 +0000 Subject: temporarily reverting r5258 to see if this makes a difference in the webtest git-svn-id: http://dev.piwik.org/svn/trunk@5274 59fd770c-687e-43c8-a1e3-f5a4ff64c105 --- core/Date.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'core/Date.php') diff --git a/core/Date.php b/core/Date.php index f2c6a94512..3c7962ce1e 100644 --- a/core/Date.php +++ b/core/Date.php @@ -44,7 +44,6 @@ class Piwik_Date */ static public function factory($dateString, $timezone = null) { - $invalidDateException = new Exception(Piwik_TranslateException('General_ExceptionInvalidDateFormat', array("YYYY-MM-DD, or 'today' or 'yesterday'", "strtotime", "http://php.net/strtotime"))); if($dateString instanceof self) { $dateString = $dateString->toString(); @@ -74,18 +73,12 @@ class Piwik_Date ($dateString = strtotime($dateString)) === false )) { - throw $invalidDateException; + throw new Exception(Piwik_TranslateException('General_ExceptionInvalidDateFormat', array("YYYY-MM-DD, or 'today' or 'yesterday'", "strtotime", "http://php.net/strtotime"))); } else { $date = new Piwik_Date($dateString); } - $timestamp = $date->getTimestamp(); - if($timestamp < 681436800 // can't be doing web analytics before the 1st website - || $timestamp > 7289049600 // piwik is designed to last (date lib will break long before that) - ) { - throw $invalidDateException; - } if(empty($timezone)) { return $date; -- cgit v1.2.3