Server Time
Our extensions require that the date, time, and timezone be set correctly on the server. You can check if the timezone is set correctly using the command below. It should be symlinked properly to the correct timezone as that is what the extension uses to determine the timezone:
# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 36 Oct 30 2020 /etc/localtime -> /usr/share/zoneinfo/America/Edmonton
How to set the timezone in Linux
https://linuxize.com/post/how-to-set-or-change-timezone-in-linux/
How to change the Time Zone by Creating a Symlink
MySQL Timezone
Some time columns uses the MySQL NOW() function for generating time information. You can check to see that the timezone is set correctly for the database using the commands below. It should match the time from the date command :
# mysql -u admin -p`cat /etc/psa/.psa.shadow` -s -N -e "SELECT NOW();"
2024-10-15 10:27:06
# date
Tue Oct 15 10:27:10 MDT 2024
How to set the timezone in MySQL
https://phoenixnap.com/kb/change-mysql-time-zone
Checking if the time is stored correctly in the Warden database
You can query the msgs log table from the command line to check if the last records have the correct time:
mysql -u admin -p`cat /etc/psa/.psa.shadow` -s -N -e "use danami_warden; select time_iso, subject, from_addr from msgs order by time_iso DESC limit 5;"