Skip to content

Fix "Google search results usually link to the wrong place"

Tomas Vik requested to merge 2296-utc-archive into develop

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:

Screenshot_2019-09-27_at_08.25.38

Testing strategy

  1. Validate that timestamp in the normal chat is still in your local timezone
  2. 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 to 2019-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)
  3. See that messages in the archive are showing UTC time with UTC string appended to them (both server and client-side)
  4. test that permalinks in archive still work
    1. go to the archive and click on a timestamp, copy permalink and open it in a new window
    2. 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

Merge request reports