BasedHardware / omi

AI wearables
https://omi.me
MIT License
3.32k stars 388 forks source link

Use datetime.now(timezone.utc) instead of datetime.utcnow(), cause py… #790

Closed beastoin closed 1 week ago

beastoin commented 1 week ago

…dantic will not include post-fix Z with utcnow() func

Summary by Entelligence.AI


github-actions[bot] commented 1 week ago

Image description Entelligence.AI

Walkthrough

This change updates the timestamp generation across various functions in multiple files, replacing datetime.utcnow() with datetime.now(timezone.utc). This ensures accurate timezone handling and avoids appending a 'Z' postfix when using utcnow(). The update doesn't alter function signatures, external interfaces, or global data structures.

Changes

Files Summary
backend/database/chat.py, backend/database/facts.py, backend/database/redis_db.py, backend/database/vector_db.py, backend/models/facts.py, backend/routers/chat.py, backend/routers/screenpipe.py, backend/routers/transcribe.py, backend/routers/users.py, backend/routers/workflow.py, backend/scripts/rag/current.py, backend/utils/memories/process_memory.py Updated timestamp generation from datetime.utcnow() to datetime.now(timezone.utc) for proper timezone handling. No changes to function signatures, external interfaces, or global data structures.

"In the realm of code where timezones collide, A change was made with much pride. From utcnow() we part, to now(timezone.utc) we ride, Ensuring timestamps worldwide abide. 🌍🕰️"


Uplevel your code reviews with Entelligence.AI Pro ### Entelligence.AI Pro If you like this project, please support us by purchasing the [Pro version](https://Entelligence.AI.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, Entelligence.AI Pro is free for open source projects.