[BUG] Pinned-repo charts can count one UTC day twice across daylight saving

オープン
#4,060 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Junaid2-7777 がすでに取り組んでいます。

2026年12月3日 から。

  • #4062 @Junaid2-7777 による — オープン

評価

この issue はまだ評価されていません。

説明

bug needs-triage status:assigned
What happened?

fetchPinnedRepoDetails bins commits by UTC date, but generates its expected dates using local setDate() followed by UTC serialization. A self-hosted server in a daylight-saving timezone can therefore get a duplicate UTC date in the 30-day chart. The chart and its displayed total can count the same commits twice. Expected: 30 consecutive, unique UTC calendar days.

Steps to reproduce
  1. Run Node with TZ=America/New_York and freeze the clock at 2026-03-10T23:30:00Z.
  2. In src/lib/pinned-repos.ts, inspect the UTC dates generated by the existing setDate(getDate() - i) loop. The final six are March 6, 7, 8, 8, 9, 10, rather than March 5–10. I reproduced those date buckets locally.
  3. A commit on March 8 contributes to both chart points; March 5 has no point.

I’d like to make the lookback and buckets use UTC consistently and add a regression test, without changing the chart UI.

Where is it?

Dashboard overview

Where did you see it?

Local development

Browser and device

No response

Screenshots, console errors or logs

No response

Want to fix it?
  • I'd like to work on this. A maintainer will assign you; please don't start before that.
主要言語
TypeScript
スター
246
フォーク
436
平均マージ
9時間 33分
マージ済み PR(30日)
213

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Priyanshu-byte-coder/devtrack のほかの issue

Priyanshu-byte-coder/devtrack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。