Open kylemtowle opened 4 years ago
[{"latitude":14.08051832,"longitude":-60.94727734,"time":1587332801000},{"latitude":14.08815485,"longitude":-60.95036579,"time":1587333447000},{"latitude":14.0896572,"longitude":-60.95411059,"time":1587333749000}]
Hey Kyle;
It was great speaking to you today as well. The error seems to be in the Safe Places Redaction Tool. I have attached a screenshot and the supporting json file. It is off by 3 hrs. I wrote some code to show what it should look like and I have pasted it at the bottom of the screenshot.to show show you what it should say. I was at the location at 6pm yesterday and it shows 3pm. Happy to assist.
Regards Jim
Any chance we can have the file shown in the screenshot above?
Not sure which file you are referring to...
The json file Jim loaded on the redaction tool
How does the MAPS API convert these timestamps to local time zone? The unix timestamps are in GMT and are correct, they just need to be converted to the local time zone. In the example above they look to be converted to PST..
Happens here: https://github.com/tripleblindmarket/safe-places/blob/develop/js/location-scrubber.js#L266
From this SO article looks like .toLocaleString()
is getting Jim's timezone from his system user settings.
Could be that the TZ on Jim's computer is set to PST or he is using a browser flavor that doesn't implement .toLocalString()
correctly.
AFIK, there are three ways to get Times to display with the correct Timezone (none of which are great)
How mission critical is this bug in getting early traction? Option 1 and 2 look like solid requirements for dev_react. Could potentially be time-consuming for MVP
Saint Lucia reports that the unix timestamps are off by 3 hours from local time when they load the GPS data into the redaction tool.