- Timestamp:
- 18 Nov 2015, 15:55:26 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py
r13472 r13478 169 169 return _("Payment ticket can't be re-sent to CollegePAY.") 170 170 tz = getUtility(IKofaUtils).tzinfo 171 try: 172 time_delta = datetime.utcnow() - self.context.creation_date 173 except TypeError: 174 # when importing datetimes we are storing offset-aware datetimes 175 # which causes a TypeError 176 now = datetime.now(tz) 177 time_delta = datetime.now(tz) - self.context.creation_date 171 now = datetime.utcnow() 172 if self.context.creation_date.tzinfo is not None: 173 # That's bad. Please store timezone-naive datetimes only! 174 now = self.context.creation_date.tzinfo.localize(now) 175 time_delta = now - self.context.creation_date 178 176 if time_delta.days > 7: 179 177 return _("This payment ticket is too old. Please create a new ticket.")
Note: See TracChangeset for help on using the changeset viewer.