diff mgallery.php @ 276:be152168d945

Use DateTime objects instead of UNIX timestamp integers for MG_DATE values.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 15 May 2019 04:13:59 +0300
parents b1d004a6d3f1
children 25324e33fc78
line wrap: on
line diff
--- a/mgallery.php	Wed May 15 01:24:18 2019 +0300
+++ b/mgallery.php	Wed May 15 04:13:59 2019 +0300
@@ -349,10 +349,9 @@
 function mgTimeStr($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);
+  return strftime("%d %b %Y (%H:%M:%S)", is_object($stamp) ? $stamp->getTimestamp() : $stamp);
 }