Skip to content

Use timezone-aware UTC timestamps#397

Merged
warren618 merged 2 commits into
HKUDS:mainfrom
mustafakamal88:fix/aware-utc-timestamps-395
Jul 7, 2026
Merged

Use timezone-aware UTC timestamps#397
warren618 merged 2 commits into
HKUDS:mainfrom
mustafakamal88:fix/aware-utc-timestamps-395

Conversation

@mustafakamal88

Copy link
Copy Markdown
Contributor

Summary

Why

Fixes #395.

This avoids deprecated UTC timestamp generation and makes stored/generated timestamps explicit about their timezone.

Changes

  • Added a small UTC timestamp helper in the session models.
  • Updated session, goal, channel, API, swarm, and connector timestamp generation to use timezone-aware UTC.
  • Added a grep gate for datetime.utcnow() and bare datetime.now() in the scoped timestamp paths.
  • Added agent/tests/test_session_timestamp_timezone.py.

Test Plan

  • python3 -m pytest -q agent/tests/test_session_timestamp_timezone.py
  • bash tools/ci_grep_gates.sh
  • grep -RIn "datetime.utcnow(" agent tools || true
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

datetime.utcnow() deprecated + naive/aware timestamp islands across session/goal/channel layers

2 participants