soscripted / sox

Stack Overflow Extras: a userscript for the Stack Exchange websites to add a bunch of optional toggle-able features
http://stackapps.com/q/6091/
MIT License
72 stars 15 forks source link

Convert timestamps on chat transcript pages to local time #346

Closed GaurangTandon closed 4 years ago

GaurangTandon commented 6 years ago

On any https://chat.stackexchange.com/transcript/ROOM_ID page, for example, the transcript for Charcoal HQ, the message timestamps are shown in UTC time, as opposed to the actual room where timestamps are in local time.

I propose a new feature to convert the timestamps on the transcript page to the user's local time as well.

Edge case: in cases where the user is in the morning of a day, and the message was posted in the night of the previous day, the date that is shown on the right side of the chat transcript would be off-by-one. The only way to fix it is by: a) checking which timestamps cross the midnight on conversion to local time b) append the new date directly to them. Relevant demo:

image

shu8 commented 6 years ago

@GaurangTandon nice idea, we could could extend the current 'Convert timestamps to your local time' feature to do this? It could even have a per-feature setting to enable in chat or not?

GaurangTandon commented 6 years ago

I never actually tried out the "Convert timestamps to your local time" because... timestamps have always been in local time for me already!?...unless I really missed something

shu8 commented 6 years ago

@GaurangTandon ah sorry, that feature changes the tooltip from the UTC time to relative time!

GaurangTandon commented 6 years ago

Yeah, I guess we could reuse some of the functionality from that code too.

samliew commented 6 years ago

I have a similar userscript here https://github.com/samliew/SO-mod-userscripts/blob/master/ChatTranscriptHelper.user.js

GaurangTandon commented 6 years ago

@shu8 @samliew has actually got dozens of userscripts right there --> https://github.com/samliew/SO-mod-userscripts, some of them are so good that it's hard to resist making a new issue for each one of them for inclusion in SOX :P

You wanna go in there and push the most awesome ones directly into socripted/sox/blob/master/ @shu8? (with due credits by MIT License)

shu8 commented 6 years ago

Nice! They all look really useful!

I'm not sure if I should add them into SOX if they're already available as separate userscripts though; they're all quite major and deserve their own script!

If you have any thoughts @samliew I'd be happy to hear them! :)

samliew commented 6 years ago

I'm okay if you want to have any of my userscripts included in SOX if you find them useful, although you might want to check for updates occasionally.

mezmi commented 4 years ago

Closing this as there is maintained option available from @samliew.