netcast_service.py 287 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 from datetime import datetime, timedelta def subtract_from_time(date_time, subtr_min, subtr_sec): sub = datetime.strptime(date_time, "%d.%m.%Y %H:%M") sub = (sub - timedelta(minutes=int(subtr_min), seconds=int(subtr_sec))).isoformat() return sub