Author Topic: Real date for chat messages.  (Read 1444 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

Real date for chat messages.
« on: September 17, 2016, 01:22:37 PM »

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


Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4675
  • Total likes: 170
  • Helpful: 108
  • Languages: EN, NO
Re: Real date for chat messages.
« Reply #1 on: September 17, 2016, 02:37:15 PM »
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.

Offline Yona-TYT

Re: Real date for chat messages.
« Reply #2 on: September 17, 2016, 02:44:52 PM »
Maybe show how long ago was written, can also be useful.

Offline DrSuperGood

Re: Real date for chat messages.
« Reply #3 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!

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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4675
  • Total likes: 170
  • Helpful: 108
  • Languages: EN, NO
Re: Real date for chat messages.
« Reply #4 on: September 17, 2016, 06:13:20 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8749
  • Total likes: 305
  • Helpful: 229
  • Languages: De,EN,JP
Re: Real date for chat messages.
« Reply #5 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4675
  • Total likes: 170
  • Helpful: 108
  • Languages: EN, NO
Re: Real date for chat messages.
« Reply #6 on: September 17, 2016, 08:21:04 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.

Offline River

Re: Real date for chat messages.
« Reply #7 on: September 18, 2016, 06:24:00 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4675
  • Total likes: 170
  • Helpful: 108
  • Languages: EN, NO
Re: Real date for chat messages.
« Reply #8 on: September 18, 2016, 07:20:16 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.