X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/89d002baaa196b21ac4d4072e21e7451c47a2355..337d60b9d05113d8b2c5bdf9ada7ab9fe8225512:/lib/functions.php diff --git a/lib/functions.php b/lib/functions.php index 85651ba..e4bfbb5 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -120,6 +120,21 @@ function jirafeau_human_size($octets) return round($o, 1) . $u[$p]; } +// Convert UTC timestamp to a datetime field +function jirafeau_get_datetimefield($timestamp) +{ + $content = '' + . strftime('%Y-%m-%d %H:%M', $timestamp) . ' (GMT)'; + return $content; +} + +function jirafeau_fatal_error($errorText, $cfg = array()) +{ + echo '
' . $errorText . '