Do not rebuild tt

This commit is contained in:
Fred Boniface 2023-07-02 21:12:16 +01:00
parent 4056d962e9
commit b00e758dd5
1 changed files with 2 additions and 3 deletions

View File

@ -26,7 +26,6 @@ import json
import mongo
import time
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo
# This module downloads a single TOCs Schedule data
now = datetime.now()
@ -195,12 +194,12 @@ def _helpParseDays(string):
def _helpParseDate(string :str, time :str = "false"):
# Incoming string contains date in format %Y-%m-%d, if the time signified end of schedule,
# append 23:59:59 to the time, else append 00:00:00 to the string.
# append 23:59:59 to the time, else append 00:00:00 to the string and localize the object.
if time == "end":
string += " 235959"
else:
string += " 000000"
return datetime.strptime(string, "%Y-%m-%d %H%M%S").astimezone(ZoneInfo("Europe/London"))
return datetime.strptime(string, "%Y-%m-%d %H%M%S")
def _removeOutdatedServices():
log.out("timetable._removeOutdatedServices: Removing out of date schedules", "INFO")