indieweb / chat.indieweb.org

https://chat.indieweb.org
Apache License 2.0
15 stars 7 forks source link

date/timezone mismatch when linking to chat lines #9

Closed sknebel closed 6 years ago

sknebel commented 8 years ago

I use chat.indieweb.org with timezone set to "Europe/Berlin". When I go to https://chat.indieweb.org/2016-07-16, the top-most line is

# 0:03 KevinMarks1 put my webmentions into the sidebar on desktop: http://www.kevinmarks.com/svgsparklines.html

When I click the "#" to get a permalink, I go to https://chat.indieweb.org/2016-07-15#t1468620209147000, which doesn't show the comment, since for my timezone, it happened at a different date.

Similarly but less critical, if I click the time to get a permalink for the line only, I get this link: https://chat.indieweb.org/2016-07-15/1468620209147000, which shows the comment correctly, but since the date in the URL is "wrong" it looks like the comment was made on 0:03 on the 15th and not the 16th.

Similar issues happen if links are shared: depending on the timezone settings of the user opening the link, they will look right or fail. Since the UNIX timestamps are available in the link, a user could maybe be redirected to the page with the correct date in the URL? (this would mean multiple URLs lead to one chat line though)

aaronpk commented 8 years ago

ah, it looks like the fragment links aren't taking timezone into account. Right now the date in the individual permalinks are UTC, so it will look "wrong" in most US timezones for most of the day, but I'm not sure that's really a huge problem. I should make the actual date more visible on the page in the local timezone: https://github.com/indieweb/chat.indieweb.org/issues/10

dissolve commented 7 years ago

:-1: to I'm not sure that's really a huge problem giving out links that may or may not even contain the text you are linking them to based on the TZ they are in is definitely a big deal. i would say that #33 is related. If you assume the URL given date is in UTC then adjust after that, it would probably make a lot of this simpler, might be a little odd to go to 2016-07-15 and only see half of that actual day in your localtime though.

snarfed commented 6 years ago

+1 to doing something about this, it bit me recently. e.g. the fragment links around https://chat.indieweb.org/dev/2017-11-29#t1512020517795000 (for me) are all 2017-11-30, which i wouldn't mind if they worked...but they don't. :P

aaronpk commented 6 years ago

To be clear, I was saying that I don't think it would be a huge problem that the date in the URL doesn't match the local timezone.

I'm fixing this by having the URLs always be UTC, and they will always load the chat logs from that day in UTC. This means in Pacific time when you're looking at 2017-11-30, it actually starts displaying logs from 2017-11-29 16:00 local time.

aaronpk commented 6 years ago

Should be all fixed now! Just deployed the new logs!