

def _mktime(time_struct):
    "Custom mktime because Windows can't be arsed to properly do pre-Epoch\n    dates, probably because it's busy counting all its chromosomes.\n    "
    try:
        return time.mktime(time_struct)
    except OverflowError:
        dt = datetime.datetime(*time_struct[:6])
        ep = datetime.datetime(1970, 1, 1)
        diff = (dt - ep)
        ts = ((((diff.days * 24) * 3600) + diff.seconds) + time.timezone)
        if (time_struct.tm_isdst == 1):
            ts -= 3600
        if ((time_struct.tm_isdst == (- 1)) and _isdst(dt)):
            ts -= 3600
        return ts

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