How can I fix incorrect date and times displayed in the extension?

Overview

The extension relies on accurate system and database timestamps to function correctly. Incorrect date, time, or timezone configurations can lead to display discrepancies, logging errors, or synchronization issues. This article outlines the verification steps for operating system and MySQL timezone settings, along with methods to validate stored timestamps.

Prerequisites

  • Root or sudo access to the server via SSH

Verify Server Time and Timezone Configuration

The extension determines the active timezone by reading the system symlink. Verify that /etc/localtime points to the correct timezone file within /usr/share/zoneinfo/.

# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 36 Oct 30  2020 /etc/localtime -> /usr/share/zoneinfo/America/Edmonton

If the symlink is missing or references an incorrect timezone, update it using one of the following reference guides:

Verify MySQL Database Timezone

Certain database columns utilize the MySQL NOW() function to generate timestamps. Ensure the MySQL timezone aligns with the system time returned by 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

If the timestamps do not match, configure the MySQL timezone using the following reference:

Validate Timestamps in the Warden Database

After verifying system and database settings, confirm that recent records are stored with accurate timestamps by querying the danami_warden database:

plesk db -s -N -e "use danami_warden; select time_iso, subject, from_addr from msgs order by time_iso DESC limit 5;" 

Review the query output to ensure the time_iso values reflect the correct date and time.

Troubleshooting & Common Issues

  • Mismatched System and Database Times: If the server timezone is correct but MySQL displays incorrect times, apply the MySQL timezone configuration steps above. Restart the database service if changes do not take effect immediately.
  • Incorrect Symlink Target: Ensure /etc/localtime points to a valid path under /usr/share/zoneinfo/. Invalid or broken symlinks will cause fallback behavior or default to UTC.
  • timezone, time
  • 1 Utilisateurs l'ont trouvée utile
Cette réponse était-elle pertinente?

Articles connexes

The maldet real-time monitoring daemon will not start. How can I fix this?

1. Try killing the process using maldet directly: maldet --kill-monitor systemctl restart...

How can I fix the error: Host '127.0.0.1' is not allowed to connect to this MariaDB server?

Overview This article provides resolution steps for the MariaDB connection error Host...

How can I fix the error: Parse error at /etc/clamav/clamd.conf Unknown option ScanImage?

Overview The clamav-daemon.service may fail to start due to unrecognized configuration...

How can I fix the error: The domain limit of this license key has been reached?

Overview The Admin and Pro editions of Danami products enforce a maximum domain limit within the...

How can I fix the error: The domain limit of this license key has been reached?

Overview The Admin and Pro editions of Danami products enforce a maximum domain limit within the...