Fix "Google search results usually link to the wrong place"
Closes #2296 (closed)
This MR is removing logic that was customising archive page to the user's timezone. Now we always use UTC and we display UTC
string at the end of the date:
Testing strategy
- Validate that timestamp in the normal chat is still in your local timezone
✅ - See that archive boundaries are now using UTC
✅ - you can change the date of a message in DB to be at the boundary (e.g. CET is +2h from UTC, so I change a message have
sent
date to2019-09-25 23:00:00
that means in UTC it's been sent on 25th but in CET it's been sent on 26th) - this message should show in the UTC date and not local date (example from above would be in
community/room/archives/2019/09/25
)
- you can change the date of a message in DB to be at the boundary (e.g. CET is +2h from UTC, so I change a message have
- See that messages in the archive are showing UTC time with
UTC
string appended to them (both server and client-side)✅ - test that permalinks in archive still work
✅ - go to the archive and click on a timestamp, copy permalink and open it in a new window
- take the same permalink and change date, e.g.
http://localhost:5000/test-2-yeah/community/archives/2019/09/20?at=5d847ce4a5f7bc19c90a130b
=>http://localhost:5000/test-2-yeah/community/archives/2019/09/10?at=5d847ce4a5f7bc19c90a130b
going to this changed permalink should cause redirect to the original date
Edited by Tomas Vik (OOO back on 2024-08-12)