Skip to content

fix: use timezone-aware websocket timestamps#7736

Open
Ghraven wants to merge 1 commit into
microsoft:mainfrom
Ghraven:fix/ws-timezone-aware-timestamps-api
Open

fix: use timezone-aware websocket timestamps#7736
Ghraven wants to merge 1 commit into
microsoft:mainfrom
Ghraven:fix/ws-timezone-aware-timestamps-api

Conversation

@Ghraven
Copy link
Copy Markdown

@Ghraven Ghraven commented May 23, 2026

Summary

  • Replace datetime.utcnow() in AutoGen Studio websocket responses with timezone-aware UTC timestamps
  • Keep websocket error/pong payload timestamps explicit about UTC

Problem

datetime.utcnow() returns a naive datetime and is deprecated in Python 3.12. These websocket payloads are timestamped as UTC values, so using datetime.now(timezone.utc) makes that timezone explicit in the serialized ISO string.

Before / After

Before:

datetime.utcnow().isoformat()

After:

datetime.now(timezone.utc).isoformat()

Verification

  • python -m compileall -q python\packages\autogen-studio\autogenstudio\web\routes\ws.py
  • git diff --check

The local sparse checkout had Windows long-path limitations for the full repository, so I verified the touched Python file directly.

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.

1 participant