1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-15 09:34:14 +02:00

fix(admin-plugin): next round of fixing bugs with dates

This commit is contained in:
Awilum
2020-02-29 21:33:04 +03:00
parent 9320e41e15
commit 1af6628604

View File

@@ -880,7 +880,7 @@ class EntriesController extends Controller
Arr::delete($entry, 'modified_at');
if (isset($data['created_at'])) {
$data['created_at'] = date($this->registry->get('flextype.date_format'), $data['created_at']);
$data['created_at'] = date($this->registry->get('flextype.date_format'), strtotime($data['created_at']));
} else {
$data['created_at'] = date($this->registry->get('flextype.date_format'), $entry['created_at']);
}
@@ -888,7 +888,7 @@ class EntriesController extends Controller
if (isset($data['published_at'])) {
$data['published_at'] = (string) date($this->registry->get('flextype.date_format'), strtotime($data['published_at']));
} else {
$data['published_at'] = (string) date($this->registry->get('flextype.date_format'), strtotime($entry['published_at']));
$data['published_at'] = (string) date($this->registry->get('flextype.date_format'), $entry['published_at']);
}
if (isset($data['routable'])) {