def _is_dst(secs = None):
    "Check if data has daylight saving time"
    d = date()
    if secs is not None:
        d = date(secs*1000)
    # calculate if we are in daylight savings time or not.
    # borrowed from http://stackoverflow.com/questions/11887934/check-if-daylight-saving-time-is-in-effect-and-if-it-is-for-how-many-hours
    jan = date(d.getFullYear(), 0, 1)
    jul = date(d.getFullYear(), 6, 1)
    dst = int(d.getTimezoneOffset() < max(abs(jan.getTimezoneOffset()), abs(jul.getTimezoneOffset())))
    return dst
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/time.py/_is_dst/original