Inconsistent Timestamps in Support Ticket Messages
Symptom
Support ticket messages that you imported using email importing or email piping have timestamps several hours ahead of or behind the actual time at which the system imported the message.
As a result, some or all of the ticket's messages display out of order.
Cause
The system is executing the PHP piping or importing script using a PHP configuration with a different date.timezone
value than your WHMCS installation.
- For email piping, this is the
pipe.php
file. - For email importing, this is the
pop.php
file.
Your server is using different PHP configurations for the PHP-CLI and PHP-CGI environments.
Troubleshooting
You can view the current timezone on the command line (PHP-CLI) by running the following command:
php -ini | grep "date.timezone"
You will receive output that resembles the following example:
date.timezone => UTC => UTC
Compare this to the PHP-CGI date.timezone value in WHMCS at Utilities > System > PHP Info:
For more information and steps to identify the php.ini
file that the system is using in both instances, see Identifying the timezone used in command line/cron engine.
Solution
Work with your system administrator or hosting provider to use the same PHP date.timezone
value in both environments.
Alternatively, you can edit the cron job command for the pop.php
file to specify the desired date.timezone
value when the command runs. For example:
php -d "date.timezone=Europe/London " -q /path/to/whmcs/crons/pop.php