Commit 8810b1c
authored
fix(testActivity): timezone edge case causing tests to appear on incorrect day (@fehmer) (monkeytypegame#6968)
steps to reproduce:
- set the browsers timezone with minus offset that is greater then the
current time utc (so new Date() will land on yesterday)
- the easiest way to do this is to open dev tools, sensors and add a
location with timezone `Pacific/Pago_Pago` which is UTC-11
- have a user with no activity for at least the last two days (utc)
- remember the last activity in the chart, e,g, August 8th has five
tests
- the last day on the chart is yesterday
- do a test
- graph now shows one activity for yesterday
- the remembered last activity is now shifted to e.g. August 7th with
five tests
fixed behaviour:
- same setup as before
- remember the last activity in the chart, e,g, August 8th has five
tests
- FIXED: the last day on the chart is today (in utc, so tomorrow in the
users timezone)
- do a test
- FIXED graph shows one activity for today (in utc)
- FIXED the remembered last activity is still on August 8th with five
tests1 parent fa03afe commit 8810b1c
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments