Database stores both. Use them at will
Which device is it? Maybe there could be a command for your device to set correct date and time for it.
Right, database stores all available timestamps (serverTime, deviceTime, fixTime). But the "State" field in the web view and in the Traccar Manager show the deviceTime/FixTime (I don't know which). This is a bit annoying, and I do not know how to change the shown timestamp to the serverTime. Do you know how to reconfigure this?
But there is a much bigger problem: When the device sends a position update, the new position is ignored when the device/fix timestamp is in the past with respect to the "newest" (wrong) device/fix timestamp stored in the database. Since device/fix timestamp are reset at every reboot of the device, many valid position updates thereafter are ignored because they appear to be outdated (which is wrong due to wrong device timestamp).
Both problems would be solved by ignoring the device/fixTime and replace it with the serverTime, since the device has no local storage to store (and then later transfer) position data. Apart from the negligible time difference due to data upload time serverTime coincides in this case with fixTime.
You can of course change this behavior customizing web app. However, I think is worthless since there are many low-cost devices that do their job quite well. I think that you are dealing more with an unneeded device rather that a software problem. Best regards.
Is there a configuration switch or preferably a "per device option" to replace all tracking device based timestamps with the server time?
I have a cheap chinese LBS tracker, which does not sync time/date with mobile network and does not allow to set time/date manually. It would therefore be very useful to just ignore the device time and replace it with the time of the server when messages are received.