Dashboard weekly and monthly activity ignore ISO-string timestamps and mix local and UTC time
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
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
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
- 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 th30d4y/OpenLearnX
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
th30d4y/OpenLearnX#767 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted security
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
th30d4y/OpenLearnX#764 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
th30d4y/OpenLearnX#761 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
th30d4y/OpenLearnX#759 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
GET /certificate/user/<user_id> skips the ownership check when no Authorization header is sentApertabug help wanted security
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
th30d4y/OpenLearnX#757 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di th30d4y/OpenLearnX
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
erkamyaman/unslop-anything#301 ·
I maintainer di solito rispondono entro 1 giorno