import pytz


def local_tzinfo_factory(offset):
    """
    Create a tzinfo object using the offset of the db connection. This ensures
    that the datetimes returned are timezone aware and will be printed in the
    reports with timezone information.
    """
    return pytz.FixedOffset(offset)