@staticmethod
    def _parse_date(date_str, tz):
        try:
            dt = datetime.strptime(date_str.strip(), '%m-%d-%Y %I:%M %p')
            return dt.replace(tzinfo=tz).astimezone(UTC)

        except __HOLE__:
            # in case like "Yesterday 3:30 PM" or dates like that.

            # calculates based on sourceTime. tz is 2p2 forum timezone
            source = datetime.now(UTC).astimezone(tz)
            dt, pt = parsedatetime.Calendar().parseDT(date_str, tzinfo=tz, sourceTime=source)

            # parsed as a C{datetime}, means that parsing was successful
            if pt == 3:
                return dt.astimezone(UTC)
            raise ValueError('Could not parse date: {}'.format(date_str))
dataset/ETHPy150Open pokerregion/poker/poker/website/twoplustwo.py/ForumMember._parse_date