@classmethod
    def _StringToDatetime(cls, strTimestamp):
        if type(strTimestamp) is not str: # i.e. byte array in Python 3
            strTimestamp = strTimestamp.decode('utf-8')
        try:
            dts = datetime.strptime(strTimestamp, SidFile._timestamp_format)
        except __HOLE__: # try the other format...
            if SidFile._timestamp_format == SidFile._TIMESTAMP_STANDARD:
                dts = datetime.strptime(strTimestamp, SidFile._TIMESTAMP_EXTENDED)
            else:
                dts = datetime.strptime(strTimestamp, SidFile._TIMESTAMP_STANDARD)
        return dts
dataset/ETHPy150Open ericgibert/supersid/supersid/sidfile.py/SidFile._StringToDatetime