From: Andrew Dolgov Date: Wed, 30 Nov 2005 09:48:20 +0000 (+0100) Subject: use LONG/SHORT_DATE_FORMAT in preferences X-Git-Tag: schema_feature_freeze_for_1.1~17 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6be6bc03937f55b6bceae90c19cf83e631aed31b;p=tt-rss.git use LONG/SHORT_DATE_FORMAT in preferences --- diff --git a/backend.php b/backend.php index ffc49731..788343e2 100644 --- a/backend.php +++ b/backend.php @@ -3009,6 +3009,9 @@ $line["login"] = htmlspecialchars($line["login"]); + $line["last_login"] = date(get_pref($link, 'SHORT_DATE_FORMAT'), + strtotime($line["last_login"])); + if ($uid == $_SESSION["uid"]) { print ""; $login = db_fetch_result($result, 0, "login"); - $last_login = db_fetch_result($result, 0, "last_login"); + $last_login = date(get_pref($link, 'LONG_DATE_FORMAT'), + strtotime(db_fetch_result($result, 0, "last_login"))); $access_level = db_fetch_result($result, 0, "access_level"); $stored_articles = db_fetch_result($result, 0, "stored_articles"); @@ -3187,7 +3191,9 @@ $result = db_query($link, "SELECT - title,feed_url,last_updated,icon_url,site_url, + title,feed_url, + SUBSTRING(last_updated,1,16) as last_updated, + icon_url,site_url, (SELECT COUNT(int_id) FROM ttrss_user_entries WHERE feed_id = id) AS total, (SELECT COUNT(int_id) FROM ttrss_user_entries @@ -3200,7 +3206,8 @@ if (db_num_rows($result) == 0) return; $title = db_fetch_result($result, 0, "title"); - $last_updated = db_fetch_result($result, 0, "last_updated"); + $last_updated = date(get_pref($link, 'LONG_DATE_FORMAT'), + strtotime(db_fetch_result($result, 0, "last_updated"))); $feed_url = db_fetch_result($result, 0, "feed_url"); $icon_url = db_fetch_result($result, 0, "icon_url"); $total = db_fetch_result($result, 0, "total"); @@ -3262,7 +3269,10 @@ $line["title"] = "" . $line["title"] . ""; } print "
  • " . $line["title"]. - " (" .$line["updated"].")
  • "; + " (" . + date(get_pref($link, 'SHORT_DATE_FORMAT'), + strtotime($line["updated"])). + ")"; } print "";