Habits & Summaries: Timezone bug?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- data-visualization, frontend
Direzione di ricerca
Esamina il percorso delle etichette delle tacche degli assi di Habit & Summary Charts, in particolare il punto in cui i valori YYYY-MM-DD diventano oggetti Date; l'issue lo identifica come il probabile punto di ingresso. Riproduci il problema in America/Denver con un periodo last-2-weeks e confronta le etichette con i tooltips. Il lavoro è completato quando le etichette degli assi corrispondono al periodo e alle date dei tooltip senza modificare i dati sottostanti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Set system timezone to one west of UTC (e.g. America/Denver)
- Log a value (e.g. @run(4.1)) in a daily note
- Open Habit & Summary Charts and choose a period containing that day
- Compare the axis label under the bar with the date in its tooltip
- See the axis label is one day earlier
Screenshots
- Lingua principale
- JavaScript
- Stelle
- 204
- Fork
- 83
- Merge medio
- 22h 27m
- PR unite (30g)
- 3
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NotePlan/plugins
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Dashboard: Task "Comment"Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Tidy: Issue with plugin.jsonForse di nuovo libera @jgclark l’ha presa 62 giorni fa e non c’è nessuna pull request aperta. Apertabug
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
Tutte le issue di NotePlan/plugins
Issue simili
-
新讀者走讀回報,照著一篇文章實際操作Apertadocumentation good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
automated issue report
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
lirantal/discoprint#29 ·
I maintainer di solito rispondono entro 1 giorno
-
RSS feed autodiscoveryApertafeature-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
louislam/uptime-kuma#7914 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Code Cleanup dependencies
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
ProjectSidewalk/SidewalkWebpage#5609 ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted javascript
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OWASP/cornucopia#3538 ·
I maintainer di solito rispondono entro 1 giorno