get[Long]ReadableDate() takes argument as 'yyyy-mm-dd hh:ii:ss'

This commit is contained in:
Uwe Steinmann 2020-12-01 18:33:30 +01:00
parent 6bb4218e44
commit 363ce485e3

View File

@ -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