'Test validation with valid datetime string'

def testValidation(self):

    validate = IS_UTC_DATE()
    assertEqual = self.assertEqual
    dtstr = '2011-11-19'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.date(2011, 11, 19))
    current.session.s3.utc_offset = (-6)
    dtstr = '2011-11-19'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.date(2011, 11, 19))
    current.session.s3.utc_offset = (+ 5)
    dtstr = '2011-11-19'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.date(2011, 11, 19))
    current.session.s3.utc_offset = (+ 11)
    dtstr = '2011-11-19'
    (value, error) = validate(dtstr)
    assertEqual(error, None)
    assertEqual(value, datetime.date(2011, 11, 18))
