Funbit / ets2-telemetry-server

ETS2/ATS Telemetry Web Server + Mobile Dashboard
GNU General Public License v3.0
614 stars 206 forks source link

"time" format in ETS2 JSON file #140

Open mrsrmn opened 3 years ago

mrsrmn commented 3 years ago

What is the format of "time" in the telemetry server JSON file? I want to format it into normal time but I couldn't find the formatting of it.

image

KS-HTK commented 2 years ago

It is just a utc date/time. yyyy-mm-ddThh:MM:ss.s+z

the Z standing for the Zulu time zone (UTC+-0) should preferably have been omitted.

It is already "normal" time, depending on you're definition of normal. Since the Game does not have time zones I do not see what you want to convert it to. It should not be converted to UNIX timestamps because of the year being to far back. If you want to convert it to AM/PM time just subtract 12 from the hh part if it is >12 and display a pm or am as required.