summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfox <[email protected]>2019-02-02 11:15:37 +0000
committerGogs <[email protected]>2019-02-02 11:15:37 +0000
commit856e0c32eb9f60ab505de0cc92406cc5bb2a1668 (patch)
tree4be476eafe3f137492ae4e04421f4d16d039fa68
parent26ac57b092d6221c6849151e17c9181705ef7c51 (diff)
parent5ac1935db535dea697c6344cfaf6e6d6f0945b24 (diff)
Merge branch '12htime' of Fmstrat/tt-rss into master
-rwxr-xr-xinclude/functions.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index af52b480c..a1aeb7135 100755
--- a/include/functions.php
+++ b/include/functions.php
@@ -951,7 +951,11 @@
if ($eta_min && time() + $tz_offset - $timestamp < 3600) {
return T_sprintf("%d min", date("i", time() + $tz_offset - $timestamp));
} else if (date("Y.m.d", $timestamp) == date("Y.m.d", time() + $tz_offset)) {
- return date("G:i", $timestamp);
+ $format = get_pref('SHORT_DATE_FORMAT', $owner_uid);
+ if (strpos((strtolower($format)), "a") === false)
+ return date("G:i", $timestamp);
+ else
+ return date("g:i a", $timestamp);
} else if (date("Y", $timestamp) == date("Y", time() + $tz_offset)) {
$format = get_pref('SHORT_DATE_FORMAT', $owner_uid);
return date($format, $timestamp);