Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Commit to PR Open time is undefined #637

Open
Kamlesh72 opened this issue Mar 22, 2025 · 1 comment · May be fixed by #638
Open

First Commit to PR Open time is undefined #637

Kamlesh72 opened this issue Mar 22, 2025 · 1 comment · May be fixed by #638
Labels
bug Something isn't working

Comments

@Kamlesh72
Copy link
Contributor

Kamlesh72 commented Mar 22, 2025

Description:

First Commit to PR Open time is 0 or null if the system timezone is other than UTC.

Steps to reproduce:

  1. Open Dora metrics
  2. Open Lead time for changes
  3. Average LT breakdown -> Commit duration

Additional context

If the database timezone is other than UTC, the PullRequest created_at, updated_at, state_changed_at fields time is incorrect.

Due to this, first_commit_to_open becomes a negative value.

first_commit_to_open = pr.created_at - pr_commits[0].created_at
@Kamlesh72 Kamlesh72 added the bug Something isn't working label Mar 22, 2025
@Kamlesh72
Copy link
Contributor Author

Kamlesh72 commented Mar 23, 2025

For example, the PR is merged at 2025-01-30 19:03:23 +05:30 but the postgres shows 2025-01-30 13:33:23 +05:30

This happens if the system date is in Non UTC format and running through manual installation.

If I run middleware using docker, it works properly because docker timezone by default is UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant