Closed bepehr closed 8 years ago
@bepehr In first parameter you should send date form like Y-m-d H:i:s and if you want convert date , use strtotime function then send that as seconde parameter.
Like It:
$this->jdate->date('Y-m-d H:i:s', strtotime($yourTimeFromDb);
Hi , when i want to convert time from mysql i get this error
DateTime::__construct(): Failed to parse time string (@2014-11-03 20:48:44) at position 8 (-): Double timezone specification
in C:\xampp\htdocs\adnasor\vendor\mohammad-mahdy\yii2-jdate\DateTime.php at line 23 14151617181920212223242526272829303132 { if(! is_string($dateFormat)) { throw new InvalidParamException( "Date format is inavlid! " . "This must be a string." ); }