chat
chat copied to clipboard
Make sure time is based on user's timezone
@finnhodgkin and I have been discussing how time will work in this app.
If the time that the message is sent is set on the server in UNIX time, then how can we make the front end of the app interpret that based on timezone?
As a related point, if we are setting the time on the server, how does this work if we want to have a "fully private" functionality (where the server is only used to connect two users over WebRTC, then the chat logs are saved only in localstorage, but the messages never go to the server), do we then set the time from the front end, and if so, how consistent is that?
For me, this is spike territory, I'm not sure how time works in Elm/Phoenix so would be important to learn.
(I would add spike
and discussion
labels to this issues but I am not authorised :cry: )
Another related feature is to display time relative to the current time.
Currently time stamps are always translated into DD/MM/YYYY HH:MM. It would be much nicer to work backwards from the current date. So when a message is just a couple minutes old it would display 'posted two minutes ago' or a day old 'yesterday at HH:MM', etc.