Time Zone

traccargps1a year ago

hi,

linux server (command date) and mysql (select now();). time are correct. in database.url I put the serverTimezone=UTC-3
even with all these adjustments, the time has been adding 3 hours more

How do I save my country's servertime?

Anton Tananaeva year ago

What time do you see in Traccar logs? Does it match your server time?

In general you should never need to mess up with timezones.

traccargps1a year ago
sudo tail -f /opt/traccar/logs/tracker-server.log
2023-01-19 21:31:10  INFO: [T1dc4022a] id: xxxxxx, time: 2023-01-19 21:31:01, lat: xxxxx, lon: xxxxx, course: xxxx

here is 18:32

traccargps1a year ago

where I do the configuration to put the correct time in Brazil !

Anton Tananaeva year ago

It looks like you haven't configured the timezone in all the places in your OS. Java still gets the wrong time. One option is to explicitly specify the timezone with something like -Duser.timezone=XXX in the command line. Add it to the traccar.service file in the systemd config.