CDR Report time incorrect


(Jhayes) #1

We are running asterisk 12.7.3-1707-2.sng7 with asterisk 13.17.0. We are having an issue with the time displaying on the cdr reports correctly. We are on EST and the server seems to be configured correctly.
[root@freepbx ~]# date
Tue Nov 7 11:01:40 EST 2017
[root@freepbx ~]# grep date.timezone /etc/php.ini
; http://php.net/date.timezone
date.timezone = “America/New_York” ;;;; Automatically updated by Sysadmin


We have verified in mysql that the CDR is written correctly to the database but the call still shows incorrectly.


(Dave Burgess) #2

Are all of the CDR times in GMT?

It seems to me that the system always stored CDR records in GMT, regardless of the system’s time setting. Of course, I might be mis-remembering that, but if memory serves (and at this age, that’s not a given) that might be your issue.


(Jhayes) #3

My issue with it being GMT, is the math doesn’t add up. GMT is a 0 and EST is currently a -5. The record is only a 3-hour difference.


(Andrew Nagy) #4

CDR and various other parts of FreePBX 14 generate the time based on what you have set in Advanced Settings and User Manager settings. Somewhere you have set your timezone wrong/incorrectly.


(Jhayes) #5

First off, I would like to note that we are using a remote database on our LAN.

This is not a configuration issue from my perception if you look at the screenshot the Advanced settings are already set to New York. We originally had them set to Indiana but after a Sangoma update, this no longer works and you get a PHP error until you resolve the PHPTIMEZONE issue.

The quirky part is, I changed the TimeZone in the Admin portion to PST thinking it would offset the bad code to show the correct time. After a reboot, the CDR actually showed up correctly with the calls displaying 3 hours before the timestamp of the CDR. Once the change was made to modify the TimeZone back to EST the same report shows the same call at +3 hrs of the CDR. I am not sure how I could have incorrectly set the timezone to display PST correctly and EST incorrectly but am happy to make the necessary changes to resolve my “user error”.

TM1000 - as for the user manager settings being incorrect. I have attached a screenshot of the ALL group which is the primary group. The Group Details of the 4 UserMan groups we have are all configured the same:


(Lorne Gaetz) #6

Did you reboot after the most recent time zone change? That is required.


(Jhayes) #7

Yes, I have rebooted after each change to ensure I knew what the fix was.


(Binay) #8

PBX 14- Go to settings- advance settings - PHP Timezone and select country time zone