Permalink
Browse files

Do not use strtotime for integer values.

  • Loading branch information...
Marc Ghorayeb
Marc Ghorayeb committed Jan 24, 2013
1 parent 396e0cb commit 22a3df0374f234904c4d221516d4df24a77626d7
Showing with 1 addition and 1 deletion.
  1. +1 −1 data/source/Database.php
View
@@ -1198,7 +1198,7 @@ protected function _cast($type, $value) {
switch ($column['formatter']) {
case 'date':
- return $column['formatter']($column['format'], strtotime($value));
+ return $column['formatter']($column['format'], is_string($value) ? strtotime($value) : $value);
default:
return $column['formatter']($value);
}

0 comments on commit 22a3df0

Please sign in to comment.