# HG changeset patch # User Matti Hamalainen # Date 1525179640 -10800 # Node ID 8ddf84b459d32912acf223e7791ddd23813b87d9 # Parent 73348fa0bc853ef162ffcd4cb07c556ffba509c4 Show timestamps in localized form. diff -r 73348fa0bc85 -r 8ddf84b459d3 mgallery.php --- a/mgallery.php Tue May 01 16:00:22 2018 +0300 +++ b/mgallery.php Tue May 01 16:00:40 2018 +0300 @@ -351,7 +351,11 @@ function mgTimeStr($stamp) { - return date("d M Y (H:i:s)", $stamp); + global $pageLang, $pageCharset; + // return date("d M Y (H:i:s)", $stamp); + $pageLocale = strtolower($pageLang)."_".strtoupper($pageLang).".".$pageCharset; + setlocale(LC_TIME, $pageLocale); + return strftime("%d %b %Y (%H:%M:%S)", $stamp); }