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

Đang mở
#4,060 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Junaid2-7777 đang làm issue này rồi.

Từ ngày 3/12/2026.

  • #4062 của @Junaid2-7777 — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.
Ngôn ngữ chính
TypeScript
Star
246
Fork
436
Merge trung bình
9 giờ 33 phút
Pull request đã merge (30 ngày)
213

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Priyanshu-byte-coder/devtrack

Tất cả issue của Priyanshu-byte-coder/devtrack

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.