From 49b1fd89ab8e9cdf55b1c3f23e97a258aee2e1ef Mon Sep 17 00:00:00 2001 From: Moe Fwacky Date: Fri, 30 Jul 2021 01:15:44 -0700 Subject: [PATCH] fixed time format issue with year notation --- both-dir/PseudoChannel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/both-dir/PseudoChannel.py b/both-dir/PseudoChannel.py index 39b33bc..9a4ada3 100644 --- a/both-dir/PseudoChannel.py +++ b/both-dir/PseudoChannel.py @@ -1443,7 +1443,7 @@ class PseudoChannel(): if entry.end_time.hour >= 0 and entry.end_time.hour < int(config.dailyUpdateTime[0]): entry.end_time = entry.end_time + datetime.timedelta(days=1) if natural_start_time.hour < int(config.dailyUpdateTime[0]) and entry.end_time.hour >= int(config.dailyUpdateTime[0]): - entry.end_time = datetime.datetime.strptime('1900-01-02 0' + str(int(config.dailyUpdateTime[0])-1) + ':59:59', '%y-%m-%d %H:%M:%S') + entry.end_time = datetime.datetime.strptime('1900-01-02 0' + str(int(config.dailyUpdateTime[0])-1) + ':59:59', '%Y-%m-%d %H:%M:%S') """Get List of Commercials to inject""" if self.USING_COMMERCIAL_INJECTION: list_of_commercials = self.commercials.get_commercials_to_place_between_media( @@ -1482,7 +1482,7 @@ class PseudoChannel(): if entry.end_time.hour >= 0 and entry.end_time.hour < int(config.dailyUpdateTime[0]): entry.end_time = entry.end_time + datetime.timedelta(days=1) if natural_start_time.hour < int(config.dailyUpdateTime[0]) and entry.end_time.hour >= int(config.dailyUpdateTime[0]): - entry.end_time = datetime.datetime.strptime('1900-01-02 0' + str(int(config.dailyUpdateTime[0])-1) + ':59:59', '%y-%m-%d %H:%M:%S') + entry.end_time = datetime.datetime.strptime('1900-01-02 0' + str(int(config.dailyUpdateTime[0])-1) + ':59:59', '%Y-%m-%d %H:%M:%S') print("INFO: End Time = {}".format(str(entry.end_time))) overlap_max_seconds=int(entry.overlap_max) * 60 print(("INFO: Overlap Max is "+str(overlap_max_seconds))) @@ -1525,7 +1525,7 @@ class PseudoChannel(): if entry.end_time.hour >= 0 and entry.end_time.hour < int(config.dailyUpdateTime[0]): entry.end_time = entry.end_time + datetime.timedelta(days=1) if natural_start_time.hour < int(config.dailyUpdateTime[0]) and entry.end_time.hour >= int(config.dailyUpdateTime[0]): - entry.end_time = datetime.datetime.strptime('1900-01-02 0' + str(int(config.dailyUpdateTime[0])-1) + ':59:59', '%y-%m-%d %H:%M:%S') + entry.end_time = datetime.datetime.strptime('1900-01-02 0' + str(int(config.dailyUpdateTime[0])-1) + ':59:59', '%Y-%m-%d %H:%M:%S') """Get List of Commercials to inject""" if self.USING_COMMERCIAL_INJECTION: list_of_commercials = self.commercials.get_commercials_to_place_between_media(