Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Habits & Summaries: Timezone bug?

Offen Anfängerfreundlich
#786 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
javascript

Rechercherichtung

Überprüfe den Pfad der Achsen-Tick-Labels von Habit & Summary Charts, insbesondere dort, wo YYYY-MM-DD-Werte zu Date-Objekten werden; das Issue identifiziert dies als den wahrscheinlichen Einstiegspunkt. Reproduziere das Problem in America/Denver mit einem last-2-weeks-Zeitraum und vergleiche die Labels mit den Tooltips. Fertig ist es, wenn die Achsen-Labels mit dem Zeitraum und den Tooltip-Daten übereinstimmen, ohne die zugrunde liegenden Daten zu ändern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
JavaScript
Sterne
204
Forks
83
Ø Merge
22 Std. 27 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus NotePlan/plugins

Alle Issues in NotePlan/plugins

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.