-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Labels
services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc
Description
Describe the bug
The lastUpdateTime for a session (from GET sessions) are not UTC when using a SQLite DB
For example, if the app server's local timezone is EDT (UTC-4):
- SQLite
func.now()stores actual UTC time, e.g., "2025-06-05 13:00:00". - SQLAlchemy reads this as naive
datetime(2025, 6, 5, 13, 0, 0). - Python's
naive_dt.timestamp()interprets13:00:00as13:00:00 EDT. - This converts to a Unix timestamp for
17:00:00 UTC(13:00 EDT + 4 hours). - The client receives a timestamp for 4 hours in the future compared to the actual UTC event.
To Reproduce
Steps to reproduce the behavior:
- Set up google-adk with a SQLite DB
- Create and then retrieve a session.
- Observe the
session.last_update_timevalue. It will be a Unix timestamp representing a UTC time that is [offset] hours ahead of the actual UTC time of the update. (The offset will match the app server's local timezone offset from UTC).
Expected behavior
The timestamp should be in UTC
Desktop:
- OS: Windows
- Python version: 3.13
- ADK version: 1.0.0
Metadata
Metadata
Assignees
Labels
services[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc