Replaced datetime.utcnow() with datetime.now(timezone.utc) in the analysis, chat, and flow services.
Added focused service tests that assert newly created analyses, chats, and flows receive timezone-aware UTC timestamps.
Why
The affected SQLAlchemy columns are declared as DateTime(timezone=True), but the services were passing naive UTC datetimes. Using timezone-aware UTC values avoids ambiguity and follows the recommended replacement for datetime.utcnow().
I could not run the focused pytest locally because this Windows environment does not have the project dependency environment installed (uv is unavailable and plain pytest import fails on missing passlib). Happy to adjust the tests if your CI shows anything I missed.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/reconurge/flowsint/pull/149
**Author:** [@Ghraven](https://github.com/Ghraven)
**Created:** 5/30/2026
**Status:** ✅ Merged
**Merged:** 6/2/2026
**Merged by:** [@dextmorgn](https://github.com/dextmorgn)
**Base:** `main` ← **Head:** `fix/timezone-aware-service-timestamps`
---
### 📝 Commits (1)
- [`b707961`](https://github.com/reconurge/flowsint/commit/b707961e688a70df6d4fc1dfdd210d189dda27a2) fix: use timezone-aware service timestamps
### 📊 Changes
**4 files changed** (+86 additions, -14 deletions)
<details>
<summary>View changed files</summary>
📝 `flowsint-core/src/flowsint_core/core/services/analysis_service.py` (+4 -4)
📝 `flowsint-core/src/flowsint_core/core/services/chat_service.py` (+6 -6)
📝 `flowsint-core/src/flowsint_core/core/services/flow_service.py` (+4 -4)
➕ `flowsint-core/tests/services/test_timezone_timestamps.py` (+72 -0)
</details>
### 📄 Description
## What changed
- Replaced `datetime.utcnow()` with `datetime.now(timezone.utc)` in the analysis, chat, and flow services.
- Added focused service tests that assert newly created analyses, chats, and flows receive timezone-aware UTC timestamps.
## Why
The affected SQLAlchemy columns are declared as `DateTime(timezone=True)`, but the services were passing naive UTC datetimes. Using timezone-aware UTC values avoids ambiguity and follows the recommended replacement for `datetime.utcnow()`.
## Verification
- `python -m py_compile flowsint-core/src/flowsint_core/core/services/analysis_service.py flowsint-core/src/flowsint_core/core/services/chat_service.py flowsint-core/src/flowsint_core/core/services/flow_service.py flowsint-core/tests/services/test_timezone_timestamps.py`
I could not run the focused pytest locally because this Windows environment does not have the project dependency environment installed (`uv` is unavailable and plain pytest import fails on missing `passlib`). Happy to adjust the tests if your CI shows anything I missed.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/reconurge/flowsint/pull/149
Author: @Ghraven
Created: 5/30/2026
Status: ✅ Merged
Merged: 6/2/2026
Merged by: @dextmorgn
Base:
main← Head:fix/timezone-aware-service-timestamps📝 Commits (1)
b707961fix: use timezone-aware service timestamps📊 Changes
4 files changed (+86 additions, -14 deletions)
View changed files
📝
flowsint-core/src/flowsint_core/core/services/analysis_service.py(+4 -4)📝
flowsint-core/src/flowsint_core/core/services/chat_service.py(+6 -6)📝
flowsint-core/src/flowsint_core/core/services/flow_service.py(+4 -4)➕
flowsint-core/tests/services/test_timezone_timestamps.py(+72 -0)📄 Description
What changed
datetime.utcnow()withdatetime.now(timezone.utc)in the analysis, chat, and flow services.Why
The affected SQLAlchemy columns are declared as
DateTime(timezone=True), but the services were passing naive UTC datetimes. Using timezone-aware UTC values avoids ambiguity and follows the recommended replacement fordatetime.utcnow().Verification
python -m py_compile flowsint-core/src/flowsint_core/core/services/analysis_service.py flowsint-core/src/flowsint_core/core/services/chat_service.py flowsint-core/src/flowsint_core/core/services/flow_service.py flowsint-core/tests/services/test_timezone_timestamps.pyI could not run the focused pytest locally because this Windows environment does not have the project dependency environment installed (
uvis unavailable and plain pytest import fails on missingpasslib). Happy to adjust the tests if your CI shows anything I missed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.