Habits & Summaries: Timezone bug?
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript
- Domínio
- data-visualization, frontend
Direção de pesquisa
Revise o caminho dos rótulos das marcações dos eixos de Habit & Summary Charts, especialmente onde os valores YYYY-MM-DD se tornam objetos Date; o issue identifica esse ponto como a provável entrada. Reproduza em America/Denver com um período last-2-weeks e compare os rótulos com os tooltips. Está concluído quando os rótulos dos eixos correspondem ao período e às datas dos tooltips sem alterar os dados subjacentes.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- JavaScript
- Estrelas
- 204
- Forks
- 83
- Merge médio
- 22h 27min
- PRs com merge (30d)
- 3
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NotePlan/plugins
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
-
Dashboard: Task "Comment"Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
-
Tidy: Issue with plugin.jsonTalvez livre de novo @jgclark assumiu há 60 dias e não há nenhum pull request aberto. Abertabug
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 38/100
Todas as issues de NotePlan/plugins
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
Mantenedores costumam responder em até 1 dia
-
Design only Leadership Survey SLFS
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
bcgov/digital-journeys#2293 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
tursodatabase/turso#9405 ·
Mantenedores costumam responder em até 1 dia
-
Toolkit
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
API Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ProjectSidewalk/SidewalkWebpage#5556 ·
Mantenedores costumam responder em até 1 dia