X-Git-Url: https://git.p6c8.net/jirafeau.git/blobdiff_plain/cd09b476cbbfa8f90f0f86e67da5414d21c8ad10..d5b85f9c7bda15446c271edf809c4dde150f6f3d:/lib/functions.php?ds=sidebyside diff --git a/lib/functions.php b/lib/functions.php index bac444b..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 . '