Skip to content

fix(reporting): use timezone-aware utc datetime in exported reports#2018

Open
NiravaM wants to merge 1 commit into
utksh1:mainfrom
NiravaM:fix/reporting-utc-timestamp
Open

fix(reporting): use timezone-aware utc datetime in exported reports#2018
NiravaM wants to merge 1 commit into
utksh1:mainfrom
NiravaM:fix/reporting-utc-timestamp

Conversation

@NiravaM

@NiravaM NiravaM commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Description

The generated_at timestamp in exported reports was being populated using a naive local datetime (datetime.now()). This was inconsistent with the timezone-aware UTC discovered_at timestamps used elsewhere in the codebase, leading to off-by-timezone confusion in exported reports.

This change updates the generated_at field generation in the report payload to use a timezone-aware UTC datetime (datetime.now(timezone.utc)).

Related Issues

fixes #1829

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

@utksh1 utksh1 added level:beginner 20 pts difficulty label for small beginner-friendly PRs type:bug Bug fix work category bonus label area:backend Backend API, database, or service work labels Jul 14, 2026

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the unrelated root package-lock.json; this backend timestamp fix should not add an empty frontend lockfile. Also add a focused report-payload test asserting generated_at is UTC-aware/UTC-derived, then rerun checks.

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 level:beginner 20 pts difficulty label for small beginner-friendly PRs type:bug Bug fix work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[#55] reporting uses naive local time (generated_at) inconsistent with UTC

2 participants