Skip to content

[Bug] Timezone shift in date generation causes incorrect report ranges #444

@mjatahar

Description

@mjatahar

Bug Description

Date strings used for generating report ranges are created using toISOString().split('T')[0].
This converts the date to UTC, which can cause a timezone shift for users in non-UTC regions.

For example, users in IST (UTC+5:30) may see the generated date shift to the previous day when the report is generated shortly after midnight.

This can result in incorrect report ranges and missing activity when filtering GitHub contributions.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Set your system timezone to a non-UTC timezone (e.g., IST).

  2. Open the Scrum Helper extension popup.

  3. Generate a report using the Yesterday Contribution option or a custom date range.

  4. Observe the generated report date range.

Expected Behavior

The generated report dates should match the local system date, ensuring accurate filtering of GitHub contributions.

Actual Behavior

Dates are generated using UTC format via toISOString(), which may shift the date backward by one day depending on the user's timezone.

Additional Context

A possible fix is replacing the UTC-based formatting:

toISOString().split('T')[0]

with a local date formatting method (YYYY-MM-DD) so the extension correctly reflects the user's local timezone.

This issue appears in:

  • src/scripts/popup.js

  • src/scripts/main.js

  • src/scripts/scrumHelper.js


Contribution Checklist

  • I have searched existing issues to ensure this bug hasn't been reported
  • I have provided clear reproduction steps
  • I have included relevant environment details
  • I have described both expected and actual behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions