Changeset 8183
- Timestamp:
- 16 Apr 2012, 21:07:28 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/accesscode.py
r8182 r8183 246 246 """ 247 247 ac_storage = self._getStoragePath() 248 now = datetime.now() 248 tz = getUtility(IKofaUtils).tzinfo 249 now = datetime.now(tz) 249 250 timestamp = now.strftime('%Y_%m_%d_%H_%M_%S') 250 251 csv_path = os.path.join( -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r8182 r8183 828 828 return 829 829 IWorkflowInfo(self.context).fireTransition('submit') 830 self.context.application_date = datetime.now() 830 tz = getUtility(IKofaUtils).tzinfo 831 self.context.application_date = datetime.now(tz) 831 832 self.context.locked = True 832 833 self.flash(_('Form has been submitted.')) -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py
r8159 r8183 32 32 from zope.i18n import translate 33 33 from zope.publisher.browser import TestRequest 34 from zope.component import getUtility 34 35 from waeup.kofa.browser.interfaces import IPDFCreator 36 from waeup.kofa.interfaces import IKofaUtils 35 37 from waeup.kofa.interfaces import MessageFactory as _ 36 38 … … 328 330 canvas.setFont("Helvetica", 9) 329 331 if not getattr(doc, 'kofa_nodate', False): 330 today = datetime.now().strftime('%d/%m/%Y %H:%M:%S') 332 tz = getUtility(IKofaUtils).tzinfo 333 today = datetime.now(tz).strftime('%d/%m/%Y %H:%M:%S') 331 334 canvas.drawString(2.2*cm, 0.5 * inch, 332 335 translate(_(u'Date: ${a}', mapping = {'a': today}))) -
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 -
main/waeup.kofa/trunk/src/waeup/kofa/objecthistory.py
r7959 r8183 60 60 """ 61 61 msgs = self._getMessages() 62 timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") 62 tz = getUtility(IKofaUtils).tzinfo 63 timestamp = datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S") 63 64 user = get_current_principal() 64 65 if user is None: -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r8180 r8183 207 207 story = [] 208 208 frame_footer = Frame(1*cm,0,width-(2*cm),1*cm) 209 timestamp = datetime.now().strftime("%d/%m/%Y %H:%M:%S") 209 tz = getUtility(IKofaUtils).tzinfo 210 timestamp = datetime.now(tz).strftime("%d/%m/%Y %H:%M:%S") 210 211 left_text = '<font size=10>%s</font>' % timestamp 211 212 story.append(Paragraph(left_text, style["Normal"]))
Note: See TracChangeset for help on using the changeset viewer.