Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Habits & Summaries: Timezone bug?

Abierto Apto para principiantes
#786 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript

Línea de trabajo

Revisa la ruta de las etiquetas de marcas del eje de Habit & Summary Charts, especialmente donde los valores YYYY-MM-DD se convierten en objetos Date; el issue identifica esto como el punto de entrada probable. Reprodúcelo en America/Denver con un período last-2-weeks y compara las etiquetas con los tooltips. Se considera terminado cuando las etiquetas del eje coinciden con el período y las fechas de los tooltips sin cambiar los datos subyacentes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Checks

  • I confirm I have restarted NotePlan and this problem still persists.
  • I confirm I have reinstalled the Plugin and this problem still persists.
  • Is this a repeatable problem?

System

  • Device OS: macOS Version 27.0 (26A428), iOS 27.0 (24A437)
  • NotePlan Version: Version 3.21.3 (1534)
  • Plugin Name & Version: "Habit & Summary Charts" v1.2.0
  • Timezone: America/Denver (MDT, UTC-6)

Describe the bug
Chart x-axis labels are one day earlier than the dates of the data plotted above them. Tooltips show the correct date, so the data appears to be keyed correctly and only the axis tick labels are shifted.

With Period set to "last 2 weeks" (header: 2026-09-14 - 2026-09-27), the x-axis runs Sep 13 - Sep 26.

Examples from the same view:

  • @bike logged Sep 24 (16.4) and Sep 25 (30.8). The bars appear above the labels "Sep 23" and "Sep 24". Hovering them shows tooltips "Thu, 24 Sep 2026" and "Fri, 25 Sep 2026".
  • @run logged Sep 15 (4.1). The bar appears above the label "Sep 14".
  • Sep 13's daily note has @bike, @run and @swim entries. The chart has a "Sep 13" label with nothing above it, because that slot is really Sep 14 (Sep 13 is correctly outside the period).

Happens on both macOS and iOS.

Likely cause: the tick labels look like they're built from new Date('YYYY-MM-DD'), which JavaScript parses as UTC midnight, then formatted in local time. West of UTC, midnight UTC on Sep 14 displays as Sep 13. The tooltip seems to use a different path that gets it right. Constructing local dates for the ticks should fix it, e.g. new Date(y, m - 1, d), new Date(str + 'T00:00:00'), or moment(str, 'YYYY-MM-DD'). This wouldn't show up for anyone at UTC or east of it.

What do you expect it to do instead?
Axis labels should match the period (Sep 14 - Sep 27) and the tooltip date for each bar.

To Reproduce

  1. Set system timezone to one west of UTC (e.g. America/Denver)
  2. Log a value (e.g. @run(4.1)) in a daily note
  3. Open Habit & Summary Charts and choose a period containing that day
  4. Compare the axis label under the bar with the date in its tooltip
  5. See the axis label is one day earlier

Screenshots

Image Image Image Image Image
Lenguaje dominante
JavaScript
Estrellas
204
Forks
83
Merge medio
22 h 27 min
PR fusionados (30 d)
3

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 NotePlan/plugins

Todos los issues de NotePlan/plugins

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.