'Test timezone-aware datetime representation'

def testTZAwareDateTimeRepresent(self):

    assertEqual = self.assertEqual
    represent = S3DateTime.time_represent
    session = current.session
    utc_offset = session.s3.utc_offset
    try:
        value = datetime.datetime(1988, 6, 21, 10, 45)
        session.s3.utc_offset = (+ 2)
        rstr = represent(value, utc=True)
        assertEqual(rstr, '12:45')
        value = datetime.datetime(1988, 6, 21, 19, 33)
        session.s3.utc_offset = (+ 5)
        rstr = represent(value, utc=True)
        assertEqual(rstr, '00:33')
        value = datetime.datetime(1988, 6, 21, 7, 6)
        session.s3.utc_offset = (-8)
        rstr = represent(value, utc=True)
        assertEqual(rstr, '23:06')
    finally:
        session.s3.utc_offset = utc_offset
