def timezone(zone):
try:<EOL><INDENT>import pytz<EOL>return pytz.timezone(zone)<EOL><DEDENT>except ImportError:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>from dateutil.tz import gettz<EOL>return gettz(zone)<EOL><DEDENT>except ImportError:<EOL><INDENT>return None<EOL><DEDENT>
Try to get timezone using pytz or python-dateutil

    :param zone: timezone str
    :return: timezone tzinfo or None