Skip to content

Commit

Permalink
Fix date format
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlpp committed Sep 14, 2018
1 parent e7ab233 commit 4df5d0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Sharp",
"name": "sharp",
"version": "3.0.0",
"dependencies": {
"bootstrap": "~3.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ function __construct($instance, $attr, $data)
*/
public function valuate()
{
// Workaround to remove unwanted part of the iso date format
// added by browser
if($pos = strpos($this->data, "(")) {
$this->data = substr($this->data, 0, $pos);
}

$value = date("Y-m-d H:i:s", strtotime($this->data));

Expand Down

0 comments on commit 4df5d0d

Please sign in to comment.