Merge lp:~vorlon/summit/datetime-widget-fix into lp:summit

Proposed by Steve Langasek
Status: Needs review
Proposed branch: lp:~vorlon/summit/datetime-widget-fix
Merge into: lp:summit
Diff against target: 12 lines (+2/-0)
1 file modified
summit/common/widgets.py (+2/-0)
To merge this branch: bzr merge lp:~vorlon/summit/datetime-widget-fix
Reviewer Review Type Date Requested Status
Summit Hackers Pending
Review via email: mp+217352@code.launchpad.net

Description of the change

Found this bug while trying to set a default time that lets us detect when the user hasn't set their arrival/departure times. The widget needs to know to convert map "12AM" to "00".

To post a comment you must log in.

Unmerged revisions

568. By Steve Langasek

Fix a bug in the datetime widget that causes 12am to be shown as 1am

567. By Steve Langasek

Make registration more obvious for non-logged-in users.

If the user is not logged in, they are shown no information about how to register, only a small login link in the upper corner of the page. Give the user a more obvious link, so that if they want to register they will be guided through the login (or account creation) process.

566. By Michael Hall

The hangout link was changed to display only between the start and end times for the meeting, which was causing tests to fail when their slot start and end times didn't overlap the current time

565. By Steve Langasek

The INSTALL/requirements.txt/Makefile in the summit don't work out of the box on any current Ubuntu releases.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/common/widgets.py'
2--- summit/common/widgets.py 2013-04-08 20:50:49 +0000
3+++ summit/common/widgets.py 2014-04-27 01:49:38 +0000
4@@ -67,6 +67,8 @@
5 else:
6 meridian = 'PM'
7 hour -= 12
8+ if hour == 0:
9+ hour = 12
10 return (hour, minute, meridian)
11
12 elif isinstance(value, time):

Subscribers

People subscribed via source and target branches