Skip to content

fix(example): use timezone-aware web search timestamps - #723

Open
Ghraven wants to merge 1 commit into
ollama:mainfrom
Ghraven:raven-web-search-helper-utc
Open

fix(example): use timezone-aware web search timestamps#723
Ghraven wants to merge 1 commit into
ollama:mainfrom
Ghraven:raven-web-search-helper-utc

Conversation

@Ghraven

@Ghraven Ghraven commented Sep 4, 2026

Copy link
Copy Markdown

Problem

examples/web_search_gpt_oss_helper.py stores page fetch timestamps with datetime.utcnow(). That creates naive datetime objects even though these values represent UTC.

Before / after

Before this change, helper pages had naive UTC-looking fetched_at values.

After this change, the helper uses datetime.now(timezone.utc) for search, fetched page, and find-result page timestamps, so fetched_at is explicitly UTC-aware.

Verification

  • python -m py_compile examples/web_search_gpt_oss_helper.py
  • direct smoke check constructing a search results page and asserting fetched_at has a UTC offset
  • 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.

1 participant