summaryrefslogtreecommitdiff
path: root/framework/Util
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Util')
-rw-r--r--framework/Util/TDateTimeStamp.php2
-rw-r--r--framework/Util/TSimpleDateFormatter.php5
2 files changed, 5 insertions, 2 deletions
diff --git a/framework/Util/TDateTimeStamp.php b/framework/Util/TDateTimeStamp.php
index f5f76004..90ca73b4 100644
--- a/framework/Util/TDateTimeStamp.php
+++ b/framework/Util/TDateTimeStamp.php
@@ -197,7 +197,7 @@ class TDateTimeStamp
$mon!==false ? $mon : date('m'),
$day!==false ? $day : date('d'));
$dt->setTime($hr, $min, $sec);
- return $dt->format('U');
+ return (int) $dt->format('U');
}
}
diff --git a/framework/Util/TSimpleDateFormatter.php b/framework/Util/TSimpleDateFormatter.php
index a1a1842a..c2fe99b0 100644
--- a/framework/Util/TSimpleDateFormatter.php
+++ b/framework/Util/TSimpleDateFormatter.php
@@ -174,7 +174,10 @@ class TSimpleDateFormatter
private function getDate($value)
{
$s = Prado::createComponent('System.Util.TDateTimeStamp');
- return $s->parseDate($value);
+ if(is_numeric($value))
+ return $s->getDate($value);
+ else
+ return $s->parseDate($value);
}
/**