anuraghazra / github-readme-stats

:zap: Dynamically generated stats for your github readmes

Home Page:https://github-readme-stats.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. Add a stats card to your profile
  2. Start committing and check results multiple times in a day.
  3. The count will be incorrect (but near to right number of streaks)

Screenshots
Current stats:
image

Commits chart:
image

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

image

Looking at your profile you have an 11 day streak. I added a screenshot to show that you have a commit on the day you claim not to have one.

Strange and Interesting.

If I look at my profile I can't see any commit made on that day (8th April).

image

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:

image

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:

image

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.

The streak count changed again. Based on my commit history this looks right but just like before it will be back to the old state. so I think it's inconsistent.

image

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.

Same issue here
image
image

@ashiqYousuf Answered your question here #1871 (comment)