Bug 1044085 - [RFE] make the times and dates displayed in the frontend location aware
Summary: [RFE] make the times and dates displayed in the frontend location aware
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Copr
Classification: Community
Component: frontend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 18:59 UTC by Ryan Lerch
Modified: 2014-03-17 06:18 UTC (History)
1 user (show)

Fixed In Version: copr-1.26-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-17 06:18:43 UTC
Embargoed:


Attachments (Terms of Use)
Proposed patch agains master (2.04 KB, patch)
2014-01-21 23:42 UTC, Igor Gnatenko
no flags Details | Diff
[PATCH] 1044085 - frontend: display time in user timezone (4.35 KB, patch)
2014-01-23 08:27 UTC, Igor Gnatenko
no flags Details | Diff

Description Ryan Lerch 2013-12-17 18:59:53 UTC
FAS has the ability for a fedora account user to set a timezone.

This should be used to offset the times presented in copr, so the times presented to the user are for their chosen timezone.

Comment 1 Igor Gnatenko 2014-01-21 23:42:11 UTC
Created attachment 853506 [details]
Proposed patch agains master

I really can't undersand how flask works. but I think this code should works.

Comment 2 Miroslav Suchý 2014-01-22 18:21:28 UTC
Igor. This is just change in template, but we first need to retrieve those data:
 * coprs_frontend/coprs/views/misc.py:login() add to ask_for=[] "timezone"
   see http://pythonhosted.org/Flask-OpenID/ for documentation of try_login()
 * you need to store it db (change model of User)
 * create migration script which will add that column into existing db.

Would you like to finish it?
For testing purposes just create frontend (just follow copr-setup.txt) and put some dummy data in db. You do not actually need backend to test it.

Comment 3 Igor Gnatenko 2014-01-22 18:25:00 UTC
Sure, I want ;)
I will try to implement this.

Comment 4 Igor Gnatenko 2014-01-23 08:27:32 UTC
Created attachment 854245 [details]
[PATCH] 1044085 - frontend: display time in user timezone

Unfortunately, I have very bad internet today and I can't test it :(

Comment 5 Miroslav Suchý 2014-01-28 01:26:09 UTC
Your patch commited as 5f03d48

Some additional fixes and changes in commits:
* c702e27 fix colision of revision id
* 3fcfc20 [db] timezone can be nullable
* 079053e [frontend] actually save the timezone to model
* ef3eb03 1044085 - move timezone modification out of template and make it actually work
* 84da5ba add date to data for test builds
* 7a00a3c rename tests to avoid confuse
* 8d35cf1 lower testing date
* c9ea250 move localized_time into filters

Thanks for contributing Igor.

Comment 6 Igor Gnatenko 2014-03-17 06:18:43 UTC
Already in production


Note You need to log in before you can comment on or make changes to this bug.