Ignore:
Timestamp:
16 Apr 2012, 20:56:59 (13 years ago)
Author:
Henrik Bettermann
Message:

Part 1: Add tzinfo to all persistent datetime objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/accommodation.py

    r7811 r8182  
    2121from datetime import datetime
    2222import grok
     23from zope.component import getUtility
    2324from zope.component.interfaces import IFactory
    2425from zope.interface import implementedBy
    25 from waeup.kofa.interfaces import academic_sessions_vocab
     26from waeup.kofa.interfaces import academic_sessions_vocab, IKofaUtils
    2627from waeup.kofa.students.interfaces import (
    2728    IStudentAccommodation, IStudentNavigation, IBedTicket)
     
    6162    def __init__(self):
    6263        super(BedTicket, self).__init__()
    63         self.booking_date = datetime.now()
     64        tz = getUtility(IKofaUtils).tzinfo
     65        self.booking_date = datetime.now(tz)
    6466        self.bed = None
    6567        return
Note: See TracChangeset for help on using the changeset viewer.