def validate_tzinfo(dummy, value):
 if ((value is not None) and (not isinstance(value, datetime.tzinfo))):
  raise TypeError(('%s must be an instance of datetime.tzinfo' % value))
 return value

def validate_tzinfo ( dummy , value ) : if ( ( value is not None ) and ( not isinstance ( value , datetime . tzinfo ) ) ) : raise TypeError ( ( '%s must be an instance of datetime.tzinfo' % value ) ) return value
validate the tzinfo option .