

def _dtfromtimestamp(timestamp):
    'Custom datetime timestamp constructor. because Windows. again.\n    '
    try:
        return datetime.datetime.fromtimestamp(timestamp)
    except OSError:
        timestamp -= time.timezone
        dt = (datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=timestamp))
        if _isdst(dt):
            timestamp += 3600
            dt = (datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=timestamp))
        return dt

dataset/ETHPy150Open KoffeinFlummi/Chronyk/chronyk/chronyk.py _dtfromtimestamp/original