From 363ce485e36c76aea281885bdc2b509aec714232 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 1 Dec 2020 18:33:30 +0100 Subject: [PATCH] get[Long]ReadableDate() takes argument as 'yyyy-mm-dd hh:ii:ss' --- inc/inc.Utils.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/inc.Utils.php b/inc/inc.Utils.php index 73a1c33a0..cbda98f98 100644 --- a/inc/inc.Utils.php +++ b/inc/inc.Utils.php @@ -28,6 +28,8 @@ function formatted_size($size_bytes) { /* {{{ */ function getReadableDate($timestamp) { /* {{{ */ global $settings; + if(!is_numeric($timestamp)) + $timestamp = strtotime($timestamp); if($settings->_dateformat) return date($settings->_dateformat, $timestamp); else @@ -36,6 +38,8 @@ function getReadableDate($timestamp) { /* {{{ */ function getLongReadableDate($timestamp) { /* {{{ */ global $settings; + if(!is_numeric($timestamp)) + $timestamp = strtotime($timestamp); if($settings->_datetimeformat) return date($settings->_datetimeformat, $timestamp); else