Changeset e9b1d7 in indico
- Timestamp:
- 01/26/12 16:16:32 (16 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
- Children:
- 4e0be3
- Parents:
- f77e30
- git-author:
- Matthew Pugh <matthew.alexander.pugh@…> (01/12/12 09:56:09)
- git-committer:
- Pedro Ferreira <jose.pedro.ferreira@…> (01/26/12 16:16:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/services/implementation/collaboration.py
r9f94a3c re9b1d7 303 303 if self._params['toTitle']: 304 304 maxKey = self._params['toTitle'].strip() 305 306 """ For relative dates, create a diff timedelta for resetting to 307 00:00 at the start of range and 23:59 at the end. 308 """ 305 309 if self._params['fromDays']: 306 310 try: … … 308 312 except ValueError, e: 309 313 raise CollaborationException(_("Parameter 'fromDays' is not an integer"), inner = e) 310 minKey = nowutc() - timedelta(days = fromDays) 314 now = nowutc() 315 diff = timedelta(hours = now.hour, minutes = now.minute, seconds = now.second) 316 minKey = now - diff - timedelta(days = fromDays) 311 317 if self._params['toDays']: 312 318 try: … … 314 320 except ValueError, e: 315 321 raise CollaborationException(_("Parameter 'toDays' is not an integer"), inner = e) 316 maxKey = nowutc() + timedelta(days = toDays) 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) 317 326 318 327 self._minKey = minKey
Note: See TracChangeset
for help on using the changeset viewer.
