def _revision_timestamp_to_local(self, timestamp_str):

        timestamp = datetime(*time.strptime(
            timestamp_str[0:19], BZRTool.DIFF_TIMESTAMP_FORMAT)[0:6])

        # Now, parse the difference to GMT time (such as +0200). If only
        # strptime() supported %z, we wouldn't have to do this manually.
        delta = timedelta(hours=int(timestamp_str[21:23]),
                          minutes=int(timestamp_str[23:25]))
        if timestamp_str[20] == '+':
            timestamp -= delta
        else:
            timestamp += delta

        # convert to local time
        return datetime.utcfromtimestamp(
            calendar.timegm(timestamp.timetuple()))
Convert a timestamp to local time.
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/scmtools/bzr.py/BZRTool._revision_timestamp_to_local