[PR #193] [MERGED] fix(core): use aware UTC timestamps #3756

Closed
opened 2026-07-12 09:15:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/reconurge/flowsint/pull/193
Author: @Ghraven
Created: 6/24/2026
Status: ✅ Merged
Merged: 6/24/2026
Merged by: @dextmorgn

Base: main ← Head: fix/core-aware-utc-cutoffs


📝 Commits (1)

  • d049cb1 fix(core): use aware UTC timestamps

📊 Changes

2 files changed (+4 additions, -4 deletions)

View changed files

📝 flowsint-core/src/flowsint_core/core/auth.py (+2 -2)
📝 flowsint-core/src/flowsint_core/core/repositories/log_repository.py (+2 -2)

📄 Description

Problem: two core timestamp paths still used datetime.utcnow(): JWT expiration in create_access_token() and the default 24-hour cutoff in LogRepository.get_by_sketch(). The project already uses timezone-aware UTC timestamps in nearby core services and models.

Before / after: before, both paths produced naive UTC datetimes. After, they use datetime.now(timezone.utc), matching the repo's timezone-aware timestamp style while preserving the same expiry duration and one-day log cutoff behavior.

Verification:

  • python -m py_compile flowsint-core\src\flowsint_core\core\auth.py flowsint-core\src\flowsint_core\core\repositories\log_repository.py
  • Tried python -m pytest flowsint-core\tests\repositories\test_log_repository.py with source paths configured, but this local environment is missing passlib, so the test run stops during import before executing tests.

🔄 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/193 **Author:** [@Ghraven](https://github.com/Ghraven) **Created:** 6/24/2026 **Status:** ✅ Merged **Merged:** 6/24/2026 **Merged by:** [@dextmorgn](https://github.com/dextmorgn) **Base:** `main` ← **Head:** `fix/core-aware-utc-cutoffs` --- ### 📝 Commits (1) - [`d049cb1`](https://github.com/reconurge/flowsint/commit/d049cb1e3ed998070b6db13effe2a42af608e90d) fix(core): use aware UTC timestamps ### 📊 Changes **2 files changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `flowsint-core/src/flowsint_core/core/auth.py` (+2 -2) 📝 `flowsint-core/src/flowsint_core/core/repositories/log_repository.py` (+2 -2) </details> ### 📄 Description Problem: two core timestamp paths still used `datetime.utcnow()`: JWT expiration in `create_access_token()` and the default 24-hour cutoff in `LogRepository.get_by_sketch()`. The project already uses timezone-aware UTC timestamps in nearby core services and models. Before / after: before, both paths produced naive UTC datetimes. After, they use `datetime.now(timezone.utc)`, matching the repo's timezone-aware timestamp style while preserving the same expiry duration and one-day log cutoff behavior. Verification: - `python -m py_compile flowsint-core\src\flowsint_core\core\auth.py flowsint-core\src\flowsint_core\core\repositories\log_repository.py` - Tried `python -m pytest flowsint-core\tests\repositories\test_log_repository.py` with source paths configured, but this local environment is missing `passlib`, so the test run stops during import before executing tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-12 09:15:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/flowsint#3756