From 608c48309084e4048d8226c3f7e363b240248040 Mon Sep 17 00:00:00 2001 From: Mark Weiman Date: Fri, 20 Jan 2017 01:16:39 -0500 Subject: Add user set timezones Currently, aurweb displays all dates and times in UTC time. This patch adds a capability for each logged in user to set their preferred timezone. Implements FS#48729. Signed-off-by: Mark Weiman Signed-off-by: Lukas Fleischer --- web/template/account_edit_form.php | 15 +++++++++++++++ web/template/flag_comment.php | 2 +- web/template/pkg_comments.php | 6 +++--- web/template/pkg_details.php | 6 +++--- web/template/pkgbase_details.php | 6 +++--- web/template/pkgreq_results.php | 2 +- web/template/stats/updates_table.php | 2 +- web/template/tu_details.php | 4 ++-- web/template/tu_list.php | 4 ++-- 9 files changed, 31 insertions(+), 16 deletions(-) (limited to 'web/template') diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index 19821a0b..17c9d14e 100644 --- a/web/template/account_edit_form.php +++ b/web/template/account_edit_form.php @@ -126,6 +126,21 @@ print ""."\n"; } } +?> + +

+

+ +

diff --git a/web/template/flag_comment.php b/web/template/flag_comment.php index 36af43ea..e8855fe8 100644 --- a/web/template/flag_comment.php +++ b/web/template/flag_comment.php @@ -5,7 +5,7 @@ ', html_format_username($message['Username']), '', '', htmlspecialchars($pkgbase_name), '', - '', gmdate('Y-m-d', $message['OutOfDateTS']), ''); ?> + '', date('Y-m-d', $message['OutOfDateTS']), ''); ?> ', htmlspecialchars($pkgbase_name), ''); ?> diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index a28e41b0..fee1898c 100644 --- a/web/template/pkg_comments.php +++ b/web/template/pkg_comments.php @@ -17,7 +17,7 @@ if (!isset($count)) { ('; if ($row['DelUserName']) { $user_fmtd = html_format_username($row['DelUserName']); @@ -40,7 +40,7 @@ if (!isset($count)) { } $heading .= ')'; } elseif ($uid && $is_edited) { - $date_fmtd = gmdate('Y-m-d H:i', $row['EditedTS']); + $date_fmtd = date('Y-m-d H:i', $row['EditedTS']); $heading .= ' ('; if ($row['EditUserName']) { $user_fmtd = html_format_username($row['EditUserName']); diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index b9c66d47..32693948 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -34,9 +34,9 @@ $msg = __('unknown'); $license = empty($row['License']) ? $msg : $row['License']; # Print the timestamps for last updates -$updated_time = ($row["ModifiedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); -$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["SubmittedTS"])); -$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($row["OutOfDateTS"])); +$updated_time = ($row["ModifiedTS"] == 0) ? $msg : date("Y-m-d H:i", intval($row["ModifiedTS"])); +$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : date("Y-m-d H:i", intval($row["SubmittedTS"])); +$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : date("Y-m-d", intval($row["OutOfDateTS"])); $lics = pkg_licenses($row["ID"]); $grps = pkg_groups($row["ID"]); diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index 1012c4e6..fe769596 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -31,9 +31,9 @@ $popularity = $row['Popularity']; $msg = __('unknown'); # Print the timestamps for last updates -$updated_time = ($row["ModifiedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); -$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : gmdate("Y-m-d H:i", intval($row["SubmittedTS"])); -$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("Y-m-d", intval($row["OutOfDateTS"])); +$updated_time = ($row["ModifiedTS"] == 0) ? $msg : date("Y-m-d H:i", intval($row["ModifiedTS"])); +$submitted_time = ($row["SubmittedTS"] == 0) ? $msg : date("Y-m-d H:i", intval($row["SubmittedTS"])); +$out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : date("Y-m-d", intval($row["OutOfDateTS"])); $pkgs = pkgbase_get_pkgnames($base_id); diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php index b27963be..426c7f08 100644 --- a/web/template/pkgreq_results.php +++ b/web/template/pkgreq_results.php @@ -67,7 +67,7 @@ - class="flagged"> + class="flagged"> diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php index 580583b5..b4c6215f 100644 --- a/web/template/stats/updates_table.php +++ b/web/template/stats/updates_table.php @@ -10,7 +10,7 @@ " title=""> - + diff --git a/web/template/tu_details.php b/web/template/tu_details.php index 38f6c0d0..d739060d 100644 --- a/web/template/tu_details.php +++ b/web/template/tu_details.php @@ -39,10 +39,10 @@ if ($yes > $active_tus / 2) {
- +
: - +
: diff --git a/web/template/tu_list.php b/web/template/tu_list.php index b3e1073a..b7253f98 100644 --- a/web/template/tu_list.php +++ b/web/template/tu_list.php @@ -38,8 +38,8 @@ - - + + -- cgit v1.2.3-24-g4f1b