Skip to content

fix(backend): standardize timezone handling to UTC ISO-8601#2033

Open
NaitikVerma6776 wants to merge 2 commits into
utksh1:mainfrom
NaitikVerma6776:cursor/utc-timezone-standardize-9bb6
Open

fix(backend): standardize timezone handling to UTC ISO-8601#2033
NaitikVerma6776 wants to merge 2 commits into
utksh1:mainfrom
NaitikVerma6776:cursor/utc-timezone-standardize-9bb6

Conversation

@NaitikVerma6776

Copy link
Copy Markdown
Collaborator

Add shared time_utils helpers and use timezone-aware UTC with an explicit offset for generated_at and discovered_at across reports, findings API responses, and report generation.

Closes #1882

What changed
Added backend/secuscan/time_utils.py for shared UTC helpers
Reports now emit UTC ISO-8601 generated_at / discovered_at (with offset)
Findings/reports API responses normalize timestamps to UTC with offset
_parse_discovered_at always returns timezone-aware UTC
Added unit tests for UTC parsing/formatting + frontend date consistency

Add shared time_utils helpers and use timezone-aware UTC with an
explicit offset for generated_at and discovered_at across reports,
findings API responses, and report generation.

Closes utksh1#1882
Default to_utc_iso to timespec=auto so finding intelligence tests can
compare against datetime.now(UTC). Update TLS verification mocks for
crawler client.stream() and stub crawl_target in API scanner tests.
@NaitikVerma6776 NaitikVerma6776 added level:intermediate 35 pts difficulty label for moderate contributor PRs type:refactor Refactor work category bonus label gssoc:approved Admin validation: approved for GSSoC scoring area:backend Backend API, database, or service work labels Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend Backend API, database, or service work gssoc:approved Admin validation: approved for GSSoC scoring level:intermediate 35 pts difficulty label for moderate contributor PRs type:refactor Refactor work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[#97] Improvement: Standardize timezone handling (UTC everywhere) in API + reports

1 participant