'Test validation with valid datetime string'

def testValidation(self):

    validate = IS_UTC_DATETIME()
    assertEqual = self.assertEqual
    dtstr = '2011-11-19    14:00:00'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.datetime(2011, 11, 19, 14, 0, 0))
    dtstr = '2011-11-19    14:00:00+0500'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.datetime(2011, 11, 19, 9, 0, 0))
    current.session.s3.utc_offset = (-8)
    dtstr = '2011-11-19    14:00:00'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.datetime(2011, 11, 19, 22, 0, 0))
    dtstr = '2011-11-19    14:00:00+0500'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.datetime(2011, 11, 19, 9, 0, 0))
