TigerMX Incorrect Time or Timezone

TigerMX Incorrect Time or Timezone

This guide is aimed at rectifying issues with AtlasGUI displaying the incorrect time, or the system reporting the wrong timezone. 

Confirm Timezone

Screenshot

  1. http://$host:8080/screenshot/

Linux Time

A quick check for the on-board time and date:
  1. host={truckIP}
  2. ssh root@$host date
Eg. System date returned in 'UTC', the time zone needs to be updated:
Tue Jun 30 08:44:26 UTC 2020
If 'date' returns the correct time then Atlasgui might need to be restarted.
  1. systemctl restart atlasgui
Take another screenshot to confirm.

Check Timezone Files Exist

Timezone Directory

Confirm if this directory exists and is populated:
  1. ssh root@$host 'ls /media/mmc/etc/timezone/'
Expect: 
local
local_continuous
If the timezone directory does not exist, copy over the directory from the attached timezone.zip. 

Check 'vars_tzupdate'

Check if this file exists:
  1. ssh root@$host 'ls /media/mmc/etc/vars_tzupdate'
If the file doesn't exist use copy over the file from the attached timezone.zip. 
Note that this 'vars_tzupdate' file is set with an offset of '36000' seconds or 10 hours. Adjust accordingly.

Reset Services

  1. ssh root@$host 'systemctl restart api-httpd atlasgui'
  2. ssh root@$host date
Expect: 
Tue Jun 30 18:44:26 Auto 2020

Confirmation

Take a screenshot of the AtlasGUI: 
  1. http://$host:8080/screenshot/
The top left time should now represent the local time for that vehicle. 

Other Potential Fixes

Reset Timezone Configuration

Remove the contents of the timezone directory
  1. rm -rf /media/mmc/etc/timezone
Trigger an update (from outside of an ssh terminal): 
  1. curl -X GET http://$host:8080/gsm/tzupdate/trigger 

Reset NTPD

Ssh onto the system and stop the Network Time Protocol Daemon (NTPD), so we can make uninterrupted repairs:
  1. systemctl stop ntpd
Set the date back to an invalid date (a date before the current firmware build date) and restart the NTPD:
  1. date -s "2012-04-12 00:00:00"
  2. systemctl start ntpd
You should now have the correct time/date: 
  1. date