From 42676fdacccb58c69ae56f0b8a824186ec8878af Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 22 Feb 2020 18:04:03 +0000 Subject: [PATCH] Get current date --- webinterface.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/webinterface.py b/webinterface.py index c0f071c0..5a85d201 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3766,18 +3766,10 @@ def todaysEventsCheck(baseDir: str,nickname: str,domain: str) -> bool: """Are there calendar events today? """ now=datetime.now() - if not currYear: - year=now.year - else: - year=currYear - if not currMonthNumber: - monthNumber=now.month - else: - monthNumber=currMonthNumber - if not currDayOfMonth: - dayNumber=now.day - else: - dayNumber=currDayOfMonth + year=now.year + monthNumber=now.month + dayNumber=now.day + calendarFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/calendar/'+str(year)+'/'+str(monthNumber)+'.txt' if not os.path.isfile(calendarFilename): return False