Update shared.make_timestamp.php
authorgarcianc <garcianc@medigrail.com>
Tue, 16 Apr 2013 00:17:50 +0000 (15 21:17 -0300)
committerbradymiller <bradymiller@users.sourceforge.net>
Sun, 28 Apr 2013 04:15:18 +0000 (27 21:15 -0700)
library/plugins/shared.make_timestamp.php

index acdd777..f557c7f 100644 (file)
@@ -18,7 +18,15 @@ function smarty_make_timestamp($string)
     if(empty($string)) {
         $string = "now";
     }
+    
+    //the following if block catches when $string  passed is already numeric
+    if(is_numeric($string)){
+        $time=$string;
+    }
+    else{
     $time = strtotime($string);
+    }
+    
     if (is_numeric($time) && $time != -1)
         return $time;