Habits & Summaries: Timezone bug?
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 78/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- javascript
- Domaine
- data-visualization, frontend
Piste de recherche
Examinez le chemin des libellés de graduations des axes de Habit & Summary Charts, en particulier là où les valeurs YYYY-MM-DD deviennent des objets Date ; l’issue identifie cela comme le point d’entrée probable. Reproduisez le problème dans America/Denver avec une période last-2-weeks et comparez les libellés aux tooltips. C’est terminé lorsque les libellés des axes correspondent à la période et aux dates des tooltips sans modifier les données sous-jacentes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- JavaScript
- Étoiles
- 204
- Forks
- 83
- Merge moyen
- 22 h 27 min
- PR mergées (30 j)
- 3
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de NotePlan/plugins
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
Dashboard: Task "Comment"Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
-
Tidy: Issue with plugin.jsonPeut-être à nouveau libre @jgclark l’a pris il y a 60 jours, et aucune pull request n’est ouverte. Ouvertebug
-
bug
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
Toutes les issues de NotePlan/plugins
Issues similaires
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
stac-utils/stac-fields#42 ·
-
[sec-check] SVG remote-reference gate misses src attributes, link hrefs and bare-string @importOuverteagent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 1 jour
-
Fix #3381 does not fix #3343: watch() returns the ref, not the value, so setup() never re-runsOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 1 jour
-
Add: Eurosport 1 PolskaOuvertechannels:add check:passed
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 2 jours