News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Real date for chat messages.

Started by Yona-TYT, September 17, 2016, 01:22:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT


Why not show the real date or maybe both?. Because the date of the game does not give much accuracy in my humble opinion.


Ters

Probably because Simutrans has no clue what the real date is (not that it is hard for it to find out). And I think chat messages are just messages, and messages in Simutrans in general are tied to events happening in the game, where in-game dates make more sense than the real-world time.

Yona-TYT

Maybe show how long ago was written, can also be useful.

DrSuperGood

Because real time is a real pain? You could have messages posted from the future or at times that never existed if one is not careful!

One could tag every message with an approximate unix style time and then compute a delta from the current unix style time to get approximately how long ago it was posted. However to reflect this in chat the calculation would need to be re-applied every update of the chat window so the messages would need to be handled separately from the normal immutable messages. If one wanted to approximate localized times from these then some form of conversion would be required which factors in things like leap years, seconds and the existence of time zones.

Ters

Quote from: DrSuperGood on September 17, 2016, 04:29:34 PM
Because real time is a real pain? You could have messages posted from the future or at times that never existed if one is not careful!

I learned the hard way a few weeks ago that the clock never was midnight in Berlin on April 1st 1893, which was a problem in two ways.

prissi

One could certainly tag messages in game time; but real time does not make much sense, or may misleading for international players, as 21pm in England might be rather 4am elsewhere.

Ters

Quote from: prissi on September 17, 2016, 08:11:53 PM
One could certainly tag messages in game time; but real time does not make much sense, or may misleading for international players, as 21pm in England might be rather 4am elsewhere.

Indeed, the time can not be part of the message text, it would have to be metadata that is converted into each players time zone when displayed. Which I think is what DrSuperGood meant.

River

Quote from: Ters on September 17, 2016, 08:21:04 PM
Indeed, the time can not be part of the message text, it would have to be metadata that is converted into each players time zone when displayed. Which I think is what DrSuperGood meant.
'

This would be nice, but as a start maybe use server time? or if the calculations are to intensive to the game.

Ters

Quote from: River on September 18, 2016, 06:24:00 PM
This would be nice, but as a start maybe use server time? or if the calculations are to intensive to the game.

The calculations are not hard, except for relative times ("x minutes ago"), which would also need continuous refreshing. I think the biggest hurdle is that one would essentially have to implement chat messages, as they would no longer be like the other messages.