Good morning, on my server is the correct server clock, mysql clock , and cdr csv clock. The problem is when the query to the mysql table is 7 hours late. I try to make a call 2021-09-26 07:40:00
[root@xxx~]# mysql -Bse "select NOW();" && echo "SYSTEM_TIME = "`date` && php -\nr "echo 'PHP_TIME = '. date('Y-m-d H:i:s');" && echo ""
2021-09-26 07:41:22
SYSTEM_TIME = Sun Sep 26 07:41:22 WIB 2021
PHP_TIME = 2021-09-26 00:41:22
MariaDB [(none)]> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| +07:00 | +07:00 |
+--------------------+---------------------+
1 row in set (0.000 sec)
[root@xxx~]# mysql -Bse “select max(calldate) from asterisk.cdr”
2021-09-26 00:40:09
CDR CSV
"2021-09-26 07:40:09",""""" <16326168096>","101","16326168096","97898987111","97898987111","cos-all","PJSIP/T2101-00000004","PJSIP/T3_sipcp-00000005","Dial","PJSIP/7898987111@sipcp,90,ktU(sub-call-recording^800ab539c17a1f57^101^789898","34","32","ANSWERED","DOCUMENTATION","","","","","1632616809.6","1632616809.6",4,"",3,"/var/spool/asterisk/monitor/800ab539c17a1f57/2021/09/26/074011-OUT-NONE-101-97898987111-1632616809.7.wav","vn","1","",""
How to make the watch insert time to table asterisk.cdr follow the server os clock?
Thanks