chairemobilite / evolution

Online survey platform for travel survey
MIT License
4 stars 9 forks source link

survey: timestamps should all be generated at the same place #785

Open tahini opened 1 week ago

tahini commented 1 week ago

The server should be responsible to timestamp event (start, completion, updates, section events, etc). Also, individual surveys should not have to worry about that.

Currently, it's a bit arbitrary where those timestamps come from. Mostly from the browsers, in the preload or saveCallback functions of the individual survey, so a bit error-prone.

Having a single autority for the clock will allow times differences to be meaningful and comparable.

For now, only the timestamp in the logs field all come from the server and can be used for comparison. And in most surveys, the timestamps in the _sections data come from the browser and should also be comparable.