ets2-telemetry-server
ets2-telemetry-server copied to clipboard
"time" format in ETS2 JSON file
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.
It is just a utc date/time. yyyy-mm-ddThh:MM:ss.s+z
- yyyy is year
- mm is month
- dd id day
- T is fixed seperator
- hh is hour
- MM is minute
- ss is seconds
- .s(ss) (optional) is fractional seconds
- +z (optional) is time zone
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.