Changeset 8183 for main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py
- Timestamp:
- 16 Apr 2012, 21:07:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py
r7811 r8183 21 21 import grok 22 22 from zope.event import notify 23 from zope.component import getUtility 23 24 from datetime import datetime 24 25 from waeup.kofa.utils.helpers import attrs_to_fields … … 26 27 from waeup.kofa.hostels.interfaces import IHostel, IBed, IBedAllocateStudent 27 28 from waeup.kofa.students.interfaces import IBedTicket 29 from waeup.kofa.interfaces import IKofaUtils 28 30 from waeup.kofa.interfaces import MessageFactory as _ 29 31 … … 204 206 return '%s without bed ticket' % old_owner 205 207 bedticket.bed = None 206 timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") 208 tz = getUtility(IKofaUtils).tzinfo 209 timestamp = datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S") 207 210 bedticket.bed_coordinates = u'-- booking cancelled on %s --' % timestamp 208 211 return old_owner
Note: See TracChangeset for help on using the changeset viewer.