Inaccurate streak count
Mohsin370 opened this issue · comments
Describe the bug
Describe the bug
The stats card does not display correct streak stats or it is consistent. I added this streak card to my profile weeks ago and I almost check my streak stat every day. Given the number of commits that I have made each day, the card stats will show incorrect numbers, sometimes higher than expected or sometimes lower than expected.
I checked in the morning it was showing 10 stars, in the evening it was 11 but it should have been 8.
Also, 8 is my longest streak which is also my current streak but it is showing 14 and that should be incorrect. it also change time to time.
To Reproduce
Steps to reproduce the behaviour:
- Add a stats card to your profile
- Start committing and check results multiple times in a day.
- The count will be incorrect (but near to right number of streaks)
Since there were no commits on the 8th, my streak should have started on the 9th of April.
Expected behavior
The streak count should be accurate based on the commits made on consecutive days.
Screenshots / Live demo link
No response
Additional context
No response
Strange and Interesting.
If I look at my profile I can't see any commit made on that day (8th April).
Since you can see that my profile repo was created on the 8th, I checked the repo created date and it's mentioned as the 9th of April. See below:
So I was wondering if this could be due to the timezone difference at which the commit was made. (Possibly)
So I reached out to this GitHub API, which shows the created_at field for the repository with time.
API Link: https://api.github.com/repos/Mohsin370/Mohsin370
Mohsin370 Repo created_at:
Given the response, the repository must have been created on 9th April but due to the timezone difference, the card is not displaying the accurate result.
Hey, @Mohsin370. This repository does not provide streak stats card. Looks like you mixed up this repository with https://github.com/DenverCoder1/github-readme-streak-stats, all corresponding questions and issue discussions should be there.
Most likely the source of your problem is a difference between your local timezone and streak stats server timezone. This is link on answer of streak stats creator about similar problem which I found, hope this helps.
@ashiqYousuf Answered your question here #1871 (comment)