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

Abierto
#4,060 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@Junaid2-7777 ya está trabajando en esto.

Desde el 3/12/2026.

  • #4062 de @Junaid2-7777 — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
246
Forks
436
Merge medio
9 h 33 min
PR fusionados (30 d)
213

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Priyanshu-byte-coder/devtrack

Todos los issues de Priyanshu-byte-coder/devtrack

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.