From 6ff9b03bf30c02e661c86822a05ce86e2786f722 Mon Sep 17 00:00:00 2001 From: Danang Probo Sayekti Date: Tue, 21 Jul 2015 07:12:27 +0700 Subject: [PATCH] Fix date time Fix the date and time on the edit content page so it will displayed as year, month, day, hour, minute, and second. --- system/admin/views/edit-audio.html.php | 7 ++++--- system/admin/views/edit-image.html.php | 7 ++++--- system/admin/views/edit-link.html.php | 7 ++++--- system/admin/views/edit-post.html.php | 7 ++++--- system/admin/views/edit-quote.html.php | 7 ++++--- system/admin/views/edit-video.html.php | 7 ++++--- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/system/admin/views/edit-audio.html.php b/system/admin/views/edit-audio.html.php index 632fabf..9d8eebf 100644 --- a/system/admin/views/edit-audio.html.php +++ b/system/admin/views/edit-audio.html.php @@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/'; $dt = str_replace($replaced, '', $oldurl[0]); $t = str_replace('-', '', $dt); $time = new DateTime($t); -$timestamp = $time->format("Y-m-d"); +$timestamp = $time->format("Y-m-d H:i:s"); // The post date $postdate = strtotime($timestamp); // The post URL @@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat } ?>" value=""/>

Url (optional)

If the url leave empty we will use the post title.

- Date Time



+ Year, Month, Day

+ Hour, Minute, Second


Meta Description (optional)
diff --git a/system/admin/views/edit-image.html.php b/system/admin/views/edit-image.html.php index aa17ccc..104b6e1 100644 --- a/system/admin/views/edit-image.html.php +++ b/system/admin/views/edit-image.html.php @@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/'; $dt = str_replace($replaced, '', $oldurl[0]); $t = str_replace('-', '', $dt); $time = new DateTime($t); -$timestamp = $time->format("Y-m-d"); +$timestamp = $time->format("Y-m-d H:i:s"); // The post date $postdate = strtotime($timestamp); // The post URL @@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat } ?>" value=""/>

Url (optional)

If the url leave empty we will use the post title.

- Date Time



+ Year, Month, Day

+ Hour, Minute, Second


Meta Description (optional)
diff --git a/system/admin/views/edit-link.html.php b/system/admin/views/edit-link.html.php index 2b8f924..e590b5f 100644 --- a/system/admin/views/edit-link.html.php +++ b/system/admin/views/edit-link.html.php @@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/'; $dt = str_replace($replaced, '', $oldurl[0]); $t = str_replace('-', '', $dt); $time = new DateTime($t); -$timestamp = $time->format("Y-m-d"); +$timestamp = $time->format("Y-m-d H:i:s"); // The post date $postdate = strtotime($timestamp); // The post URL @@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat } ?>" value=""/>

Url (optional)

If the url leave empty we will use the post title.

- Date Time



+ Year, Month, Day

+ Hour, Minute, Second


Meta Description (optional)
diff --git a/system/admin/views/edit-post.html.php b/system/admin/views/edit-post.html.php index 42aab5e..6046cc8 100644 --- a/system/admin/views/edit-post.html.php +++ b/system/admin/views/edit-post.html.php @@ -27,7 +27,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/'; $dt = str_replace($replaced, '', $oldurl[0]); $t = str_replace('-', '', $dt); $time = new DateTime($t); -$timestamp = $time->format("Y-m-d"); +$timestamp = $time->format("Y-m-d H:i:s"); // The post date $postdate = strtotime($timestamp); // The post URL @@ -63,8 +63,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat } ?>" value=""/>

Url (optional)

If the url leave empty we will use the post title.

- Date Time



+ Year, Month, Day

+ Hour, Minute, Second


Meta Description (optional)
diff --git a/system/admin/views/edit-quote.html.php b/system/admin/views/edit-quote.html.php index 87d7c21..d56ce0d 100644 --- a/system/admin/views/edit-quote.html.php +++ b/system/admin/views/edit-quote.html.php @@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/'; $dt = str_replace($replaced, '', $oldurl[0]); $t = str_replace('-', '', $dt); $time = new DateTime($t); -$timestamp = $time->format("Y-m-d"); +$timestamp = $time->format("Y-m-d H:i:s"); // The post date $postdate = strtotime($timestamp); // The post URL @@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat } ?>" value=""/>

Url (optional)

If the url leave empty we will use the post title.

- Date Time



+ Year, Month, Day

+ Hour, Minute, Second


Meta Description (optional)
diff --git a/system/admin/views/edit-video.html.php b/system/admin/views/edit-video.html.php index ffc9381..10ce0c1 100644 --- a/system/admin/views/edit-video.html.php +++ b/system/admin/views/edit-video.html.php @@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/'; $dt = str_replace($replaced, '', $oldurl[0]); $t = str_replace('-', '', $dt); $time = new DateTime($t); -$timestamp = $time->format("Y-m-d"); +$timestamp = $time->format("Y-m-d H:i:s"); // The post date $postdate = strtotime($timestamp); // The post URL @@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat } ?>" value=""/>

Url (optional)

If the url leave empty we will use the post title.

- Date Time



+ Year, Month, Day

+ Hour, Minute, Second


Meta Description (optional)