Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 853506 Details for
Bug 1044085
[RFE] make the times and dates displayed in the frontend location aware
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch agains master
0001-1044085-frontend-print-build-times-in-user-TZ.patch (text/plain), 2.04 KB, created by
Igor Gnatenko
on 2014-01-21 23:42:11 UTC
(
hide
)
Description:
Proposed patch agains master
Filename:
MIME Type:
Creator:
Igor Gnatenko
Created:
2014-01-21 23:42:11 UTC
Size:
2.04 KB
patch
obsolete
>From 9f9d3b222ff6866fb17723e5f1d79b020b60e625 Mon Sep 17 00:00:00 2001 >From: Igor Gnatenko <i.gnatenko.brain@gmail.com> >Date: Wed, 22 Jan 2014 03:39:51 +0400 >Subject: [PATCH] 1044085 - frontend: print build-times in user TZ > >Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> >--- > .../coprs/templates/coprs/detail/_builds_table.html | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > >diff --git a/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html b/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html >index a70b53c..4077eeb 100644 >--- a/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html >+++ b/coprs_frontend/coprs/templates/coprs/detail/_builds_table.html >@@ -1,4 +1,12 @@ > {% from "coprs/detail/_builds_forms.html" import copr_build_cancel_form, copr_build_repeat_form, copr_build_delete_form %} >+{% from datetime import datetime %} >+{% from dateutil import tz %} >+{{ format_tz = "%d-%m-%y %H:%M:%S" }} >+{{ utc_tz = tz.tzutc() }} >+{{ user_tz = utc_tz }} >+{% if g.user %} >+ {{ user_tz = tz.gettz(g.user.timezone) }} >+{% endif %} > > {% macro builds_table(builds) %} > {% if builds %} >@@ -14,10 +22,10 @@ > {% for build in builds %} > <tr class="build-{{ build.state }} build-state"> > <td>{{ build.id }}</td> >- <td>{{ build.submitted_on|date_from_secs }}</td> >+ <td>{{ datetime.strptime(build.submitted_on|date_from_secs, format_tz).replace(tzinfo=utc_tz).astimezone(user_tz).strftime(format_tz) }}</td> > <td>{{ build.user.name }}</td> >- <td>{{ build.started_on|date_from_secs or 'Not yet' }}</td> >- <td>{{ build.ended_on|date_from_secs or 'Not yet' }}</td> >+ <td>{{ datetime.strptime(build.started_on|date_from_secs, format_tz).replace(tzinfo=utc_tz).astimezone(user_tz).strftime(format_tz) or 'Not yet' }}</td> >+ <td>{{ datetime.strptime(build.ended_on|date_from_secs, format_tz).replace(tzinfo=utc_tz).astimezone(user_tz).strftime(format_tz) or 'Not yet' }}</td> > <td>{{ build.state }}</td> > </tr> > <tr class="details"> >-- >1.8.5.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1044085
:
853506
|
854245