FreePBX | Register | Issues | Wiki | Portal | Support

CDR and CEL time off by 5hr


(Mvogel4949) #1

FreePBX 14, Asterisk 13

Time Conditions shows the correct server time. Time Zone in System Admin shows the correct timezone. Calls are routed correctly based on time of day. PHP timezone in advanced settings is correct. Asterisk Logfiles also shows the correct times for calls.

Running - date from the cli provides the correct time and timezone
Tue Apr 16 09:21:58 CDT 2019

But it appears all of the times in the CDR and CEl are off by 5hr. Am I missing a timezone setting for the CDR and CEL?


(TheJames) #2

CDR/CEL/Asterisk uses the system timezone. I am guessing that is set incorrect. If you are in a timezone that is GMT +/- 5 then you are in UTC

https://wiki.freepbx.org/display/PPS/Time+and+NTP


(Mvogel4949) #3

I looked in etc/sysconfig/clock and found the following

ZONE=America/Chicago

so it appears to be set correctly. And the asterisk logfiles have the correct timestamp.


(TheJames) #4

Asterisk uses the system timezone so that should be correct. You may also want to look at mysql in case it is not set to do so.


(Mvogel4949) #5
MariaDB [(none)]> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM             | SYSTEM              |
+--------------------+---------------------+
1 row in set (0.00 sec)

(Mvogel4949) #6

Maybe a reboot will kick the CDR and CEL into action. I’ll also check some other V14 systems to see if this is happening elsewhere


#7

check for

usegmtime=yes

in your cdr*.conf files


(Mvogel4949) #8

etc/asterisk/cdr.conf is empty


#9

I said

cdr*.conf

egrep usegmtime /etc/asterisk/cdr*

if any are not commented then that’s not your problem.


(Mvogel4949) #10

My bad. I ran the command and it seemed to take. I’m assuming I need to do an asterisk restart for the change to take place.


(Mvogel4949) #11

Just for my personal interest what is the cdr*?


#12

No, its a diagnostic not a solution. Don’t ASS-U-ME :wink:

* matches any set of characters


(Mvogel4949) #13

I see. No results came back from the search. I appreciate your help


(Mvogel4949) #14

I ran a second reboot today and it appeared to fix the CDR time for calls. Thank you