Assuming you are using the Default Traccar Web Application,
their documentations gives great insight: https://www.traccar.org/architecture/, on how Traccar App is ensembled.
You might find this link also helpful: https://www.baeldung.com/java-convert-date-unix-timestamp.
If I understand the architecture correctly, this means that the Traccar server uses and stores UTC and the web app etc. is/must be converted to the desired time zone?
Traccar does not store UTC time.
Is it better to say that the Traccar server processes and stores the timestamps as Epoch Time or POSIX Time, or is that also wrong?
Otherwise, I am surprised that all times in the web app are correctly displayed as CET, as defined in traccar.xml <entry key='timezone'>Europe/Berlin</entry>
, but in MariaDB the times are stored as - 2 hours (i.e. UTC) and also all timestamps in the events submitted via JSON, including those from the iPhone client app, are converted to UTC. Where is my mistake in thinking?
What is the difference between Epoch Time and POSIX Time?
Epoch Time and POSIX Time are terms that are often used interchangeably, but they refer to specific concepts in time representation within computing.
In summary, Epoch Time is a general concept, while POSIX Time is a specific implementation of this concept according to POSIX standards.
Sounds like you don't understand the difference.
Let's say yes, otherwise I wouldn't have asked ;-)
Thinking constructively, get we closer to the answer if I ask whether it would be useful to take the server's time setting into account for the JSON event forward?
Possibly configurable, with default setting FALSE.
OK. Now we can move to your invalid configuration entry. Where did you get it from?
I usually go the documentation and forum search route. In the meantime, however, I also like to have code generated by ChatGPT 4o, and use it more and more for detailed questions.
ChatGPT 4o answers the question of timecode for the Traccar server in great detail and, among other things, specifically with
<config>
...
<entry key='server.timezone'>Europe/Berlin</entry>
...
</config>
but also with the note to check the error log. I may have been too blind to find an error message.
You should always verify what you get from forum or ChatGPT with the original source - the official documentation. Both configuration options you listed are complete nonsense and don't exist.
You're absolutely right, but unfortunately it's not very easy to find in the documentation.
Of course, you can also find statements like this from you
tananaev commented on Nov 10, 2015
Traccar always stores UTC time.
https://github.com/traccar/traccar/issues/1522#issuecomment-155589269
which, admittedly from 2015, cannot be reconciled with what you wrote here 2 days ago.
Traccar does not store UTC time.
So I ask myself, where exactly is the error and is this wrong Timezone entry really relevant?
Is my helplessness understandable?
If you just take statements without context, of course it won't make any sense. But if you read full threads, it will be clear. The first reference is specifically about protocol decoder and in that context, we're expecting UTC timezone from devices in most cases. The second reference (this thread) is about the data we store in the database. In that context we don't include any timezone information, so it's up to your database to decide what format it stores it.
In most cases if you see the wrong time, it means that there's some issue in communication between device and server. In vast majority of cases it means that your device is not reporting UTC time, which is what server expects (in most cases).
That sounds logical, but unfortunately it is not. Where else do you store timestamps outside the database?
Why you then write the timestamp minus 2 hours in the database, which is set to CET time zone by system setting, is not really understandable for me.
Let's get back to the original question. The web app shows the correct time - CET for my installation. So everything is fine and correct!
The same time minus 2 hours is stored in the database (this is UTC time but without an identifier), which doesn't bother me, but with JASON Forward this UTC time is transferred with an identifier and this then causes external multiple conversion work, which could be avoided.
can anyone tell me how i change time format and which file contain those time parameters.
right now i got like this time format
[serverTime] => 2024-02-15T04:56:38.555+00:00
[deviceTime] => 2023-06-20T03:39:54.000+00:00
[fixTime] => 2023-06-20T03:39:54.000+00:00
i need to change like this so help me which file contain .....
[serverTime] => 1707915760450
[deviceTime] => 1707915760450
[fixTime] => 1707915760450