From e0da20ab20db10283220e965072feb00bcc30caa Mon Sep 17 00:00:00 2001 From: zaanposni Date: Mon, 22 Jan 2024 21:10:43 +0100 Subject: [PATCH 1/2] handle times from openai as utc --- src/dataimport/informationopenaianalyze.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dataimport/informationopenaianalyze.py b/src/dataimport/informationopenaianalyze.py index 4aa3cfc..81bd61e 100644 --- a/src/dataimport/informationopenaianalyze.py +++ b/src/dataimport/informationopenaianalyze.py @@ -3,7 +3,7 @@ import asyncio import base64 from uuid import uuid4 -from datetime import datetime, timedelta +from datetime import datetime, timedelta, timezone from rich.console import Console from databases import Database @@ -116,6 +116,7 @@ async def openai(): continue start_date = parse(stream["start"]) + start_date = start_date.replace(tzinfo=timezone.utc) if start_date.year < datetime.now().year: start_date = start_date.replace(year=datetime.now().year) From c34c72c854f3adb4c872d117158bbe757d7a910e Mon Sep 17 00:00:00 2001 From: zaanposni Date: Mon, 22 Jan 2024 21:10:55 +0100 Subject: [PATCH 2/2] bump version --- src/psaggregator/package-lock.json | 4 ++-- src/psaggregator/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/psaggregator/package-lock.json b/src/psaggregator/package-lock.json index 52e64e0..856f3c2 100644 --- a/src/psaggregator/package-lock.json +++ b/src/psaggregator/package-lock.json @@ -1,12 +1,12 @@ { "name": "psaggregator", - "version": "1.2.0", + "version": "1.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "psaggregator", - "version": "1.2.0", + "version": "1.2.1", "devDependencies": { "@fontsource/fira-mono": "^4.5.10", "@neoconfetti/svelte": "^1.0.0", diff --git a/src/psaggregator/package.json b/src/psaggregator/package.json index a031f3b..1d6ab3a 100644 --- a/src/psaggregator/package.json +++ b/src/psaggregator/package.json @@ -1,6 +1,6 @@ { "name": "psaggregator", - "version": "1.2.0", + "version": "1.2.1", "scripts": { "dev": "vite dev", "build": "vite build",