src/bda/calendar/base/converter.py
def DT2dt(DT):
    """Convert Zope's DateTime to Pythons's datetime.

    Act timezone-neutral, outcome is on UTC.
    """
    if isinstance(DT, datetime.datetime):
        return DT
    # seconds (parts[6]) is a float, so we map to int
    DTutc = DT.toZone('UTC')
    year, month, day, hour, min, sec = DTutc.parts()[:6]
    sec = int(sec)
    utc = pytz.timezone('UTC')
    dt = datetime.datetime(year, month, day, hour, min, sec, tzinfo=utc)
    return dt
Convert Zope's DateTime to Pythons's datetime.

    Act timezone-neutral, outcome is on UTC.
    
Convert Zope's DateTime to Pythons's datetime.
Act timezone-neutral, outcome is on UTC.
Convert Zope ' s DateTime to Pythons ' s datetime . Act timezone - neutral outcome is on UTC .
def DT2dt(DT):
    if isinstance(DT, datetime.datetime):
        return DT
    DTutc = DT.toZone('UTC')
    year, month, day, hour, min, sec = DTutc.parts()[:6]
    sec = int(sec)
    utc = pytz.timezone('UTC')
    dt = datetime.datetime(year, month, day, hour, min, sec, tzinfo=utc)
    return dt
def DT2dt ( DT ) : if isinstance ( DT , datetime . datetime ) : return DT DTutc = DT . toZone ( 'UTC' ) year , month , day , hour , min , sec = DTutc . parts ( ) [ : 6 ] sec = int ( sec ) utc = pytz . timezone ( 'UTC' ) dt = datetime . datetime ( year , month , day , hour , min , sec , tzinfo = utc ) return dt
Convert Zope's DateTime to Pythons's datetime.
Convert Zope ' s DateTime to Pythons ' s datetime .
"""Convert Zope's DateTime to Pythons's datetime.

    Act timezone-neutral, outcome is on UTC.
    """ # seconds (parts[6]) is a float, so we map to int
DT