fix time zone
This commit is contained in:
36
.vscode/settings.json
vendored
Normal file
36
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"appService.zipIgnorePattern": [
|
||||
"__pycache__{,/**}",
|
||||
"*.py[cod]",
|
||||
"*$py.class",
|
||||
".Python{,/**}",
|
||||
"build{,/**}",
|
||||
"develop-eggs{,/**}",
|
||||
"dist{,/**}",
|
||||
"downloads{,/**}",
|
||||
"eggs{,/**}",
|
||||
".eggs{,/**}",
|
||||
"lib{,/**}",
|
||||
"lib64{,/**}",
|
||||
"parts{,/**}",
|
||||
"sdist{,/**}",
|
||||
"var{,/**}",
|
||||
"wheels{,/**}",
|
||||
"share/python-wheels{,/**}",
|
||||
"*.egg-info{,/**}",
|
||||
".installed.cfg",
|
||||
"*.egg",
|
||||
"MANIFEST",
|
||||
".env{,/**}",
|
||||
".venv{,/**}",
|
||||
"env{,/**}",
|
||||
"venv{,/**}",
|
||||
"ENV{,/**}",
|
||||
"env.bak{,/**}",
|
||||
"venv.bak{,/**}",
|
||||
"venv_planner{,/**}",
|
||||
".vscode{,/**}"
|
||||
],
|
||||
"appService.defaultWebAppToDeploy": "/subscriptions/988215e8-cbf3-4b36-8c6e-99d819f94fbf/microsoft.web/sites/subscriptions/988215e8-cbf3-4b36-8c6e-99d819f94fbf/resourceGroups/propedal-planner_group/providers/Microsoft.Web/sites/propedal-planner",
|
||||
"appService.deploySubpath": "."
|
||||
}
|
||||
@@ -129,10 +129,10 @@ def get_future_calendar_events():
|
||||
|
||||
def convert_datetime(event):
|
||||
start_date_time = datetime.fromisoformat(event["start"]["dateTime"][:-1]) \
|
||||
.replace(tzinfo=ZoneInfo('UTC')).astimezone(ZoneInfo('localtime'))
|
||||
.replace(tzinfo=ZoneInfo('UTC')).astimezone(ZoneInfo(MsalConfig.TIME_ZONE))
|
||||
|
||||
stop_date_time = datetime.fromisoformat(event["end"]["dateTime"][:-1]) \
|
||||
.replace(tzinfo=ZoneInfo('UTC')).astimezone(ZoneInfo('localtime'))
|
||||
.replace(tzinfo=ZoneInfo('UTC')).astimezone(ZoneInfo(MsalConfig.TIME_ZONE))
|
||||
|
||||
event["start"]["date"] = start_date_time.strftime("%d.%m.%Y")
|
||||
event["start"]["time"] = start_date_time.strftime("%H:%M:%S")
|
||||
|
||||
@@ -26,6 +26,7 @@ class MsalDefaulConfig():
|
||||
SECRET = "" # api secret key (from azure web interface)
|
||||
USER_ID = "user@domain"
|
||||
CALENDAR_ID = "" # calendar id - determined by /users/id/calendars
|
||||
TIME_ZONE="Europe/Vienna"
|
||||
|
||||
class MsalConfig(MsalDefaulConfig):
|
||||
AUTHORITY = "https://login.microsoftonline.com/propedal.at"
|
||||
|
||||
Reference in New Issue
Block a user