GNimrodG / simrail-map-optimized

A feature rich and optimized online map for Simrail.
https://smo.data-unknown.com
GNU Affero General Public License v3.0
2 stars 1 forks source link

DST Time Inconsistency #28

Open EMREOYUN opened 6 days ago

EMREOYUN commented 6 days ago

Similar to #19 but from the back-end side. Server times with DST displayed incorrectly, are 1 hour behind their actual time taken from the SimRail API.

CN1 image DE3 image DE4 & PL3 image EN3 image EU3, HU1 (Time and timezone inconsistency, probably from API) image PL8 image

EMREOYUN commented 3 days ago

I just found the issue. It is unrelated to the code. Most of the listed servers are fixed but unfixed ones with date mismatches. For example, servers with 1 1-hour gap have their date set to January 1st, creating an inconsistency between the time zones that use DST. I'm unsure that we can fix that because DST times are changing between years.

GNimrodG commented 3 days ago

I think the only solution is to use the hour from the timezone and set that as the hour for the time using the current UTC time as reference, it's not a nice solution but it could work. But if they're fixing it on the backend then let's wait and see what's the final solution will be.

EMREOYUN commented 3 days ago

I think the only solution is to use the hour from the timezone and set that as the hour for the time using the current UTC time as reference, it's not a nice solution but it could work. But if they're fixing it on the backend then let's wait and see what's the final solution will be.

I also tried to use server time instead of device time, which can work in any condition but couldn't do that because I'm not good at front-end things. I think the ultimate solution is this since both time and timetable data is constructed by the server time.

Using just timezone can fail because some servers uses DST and some others don't, I think.