Dashboard weekly and monthly activity ignore ISO-string timestamps and mix local and UTC time

Aperta
#751 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start in routes/dashboard.py by reading calculate_real_weekly_activity, the monthly helpers, and the streak helper to compare their date handling. Check where dashboard records are written and how their timestamps are represented, then run the relevant dashboard tests. Done means ISO-string dates are counted and dashboard calculations use consistent UTC-aware timestamps.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug help wanted

Problem

calculate_real_weekly_activity and the monthly helpers in routes/dashboard.py only count values that are datetime instances, while the streak helper accepts ISO strings, so records stored with string dates silently disappear from the charts. They also use datetime.now() (server local time) while other code writes datetime.utcnow(), so entries near midnight land on the wrong day.

Suggested fix

Add one to_datetime(value) helper that parses strings and returns timezone-aware UTC, and use it everywhere in the dashboard code.

Lingua principale
JavaScript
Stelle
31
Fork
2
Merge medio
5h 12m
PR unite (30g)
66

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di th30d4y/OpenLearnX

Tutte le issue di th30d4y/OpenLearnX

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.