Changeset 9aa0693 in indico
- Timestamp:
- 03/01/12 15:23:21 (15 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- 474698
- Parents:
- 8e7c18
- Location:
- indico/MaKaC
- Files:
-
- 2 edited
-
services/implementation/collaboration.py (modified) (2 diffs)
-
webinterface/pages/collaboration.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/services/implementation/collaboration.py
r1d5dc6 r9aa0693 312 312 except ValueError, e: 313 313 raise CollaborationException(_("Parameter 'fromDays' is not an integer"), inner = e) 314 now = nowutc() 315 diff = timedelta(hours = now.hour, minutes = now.minute, seconds = now.second) 316 minKey = now - diff - timedelta(days = fromDays) 314 midnight = nowutc().replace(hour=0, minute=0, second=0) 315 minKey = midnight - timedelta(days = fromDays) 317 316 if self._params['toDays']: 318 317 try: … … 320 319 except ValueError, e: 321 320 raise CollaborationException(_("Parameter 'toDays' is not an integer"), inner = e) 322 now = nowutc() 323 diff = timedelta(days = 1) - \ 324 timedelta(hours = now.hour, minutes = now.minute, seconds = (now.second + 1)) 325 maxKey = now + diff + timedelta(days = toDays) 321 midnight_1 = nowutc().replace(hour=23, minute=59, second=59) 322 maxKey = midnight_1 + timedelta(days = toDays) 326 323 327 324 self._minKey = minKey -
indico/MaKaC/webinterface/pages/collaboration.py
re4d5a6 r9aa0693 123 123 except ValueError, e: 124 124 raise CollaborationException(_("Parameter 'fromDays' is not an integer"), inner = e) 125 now = nowutc() 126 diff = timedelta(hours = now.hour, minutes = now.minute, seconds = now.second) 127 minKey = now - diff - timedelta(days = fromDays) 125 midnight = nowutc().replace(hour=0, minute=0, second=0) 126 minKey = midnight - timedelta(days = fromDays) 128 127 if self._queryParams['toDays']: 129 128 try: … … 131 130 except ValueError, e: 132 131 raise CollaborationException(_("Parameter 'toDays' is not an integer"), inner = e) 133 now = nowutc() 134 diff = timedelta(days = 1) - \ 135 timedelta(hours = now.hour, minutes = now.minute, seconds = (now.second + 1)) 136 maxKey = now + diff + timedelta(days = toDays) 132 midnight_1 = nowutc().replace(hour=23, minute=59, second=59) 133 maxKey = midnight_1 + timedelta(days = toDays) 137 134 138 135 if self._queryParams["conferenceId"]:
Note: See TracChangeset
for help on using the changeset viewer.
