Summary: | ASTERISK-24494: Setting timezone option in cdr_mysql to UTC has no effect | ||||
Reporter: | Vitaliy Gerdt (Vitaliy Gerdt) | Labels: | |||
Date Opened: | 2014-11-05 05:25:04.000-0600 | Date Closed: | 2014-12-16 20:26:44.000-0600 | ||
Priority: | Major | Regression? | |||
Status: | Closed/Complete | Components: | Addons/cdr_mysql | ||
Versions: | 11.7.0 | Frequency of Occurrence | |||
Related Issues: |
| ||||
Environment: | Ubuntu 12.04.5 LTS | Attachments: | ( 0) asterisk_full_log ( 1) cdr_csv_log ( 2) cdr_mysql.conf ( 3) mylog ( 4) mylog ( 5) mylog2 ( 6) system_info | ||
Description: | I want to use UTC timezone for the dates in a queries to MySQL database, so I tried to set timezone = UTC or usegmtime = yes in the config, but it'd still use localtime timezone. I tried to enable logging to CVS instead of MySQL and when usegmtime is set to yes it writes dates to CVS in UTC timezone, unlike with MySQL. When usegmtime is disabled it updates CVS with dates in localtime timezone, just as expected. | ||||
Comments: | By: Matt Jordan (mjordan) 2014-11-05 08:56:43.191-0600 We require a complete debug log to help triage the issue. This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue: https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information Please also attach you cdr_mysql.conf. Note that {{cdr_mysql}} is an extended support module. Response times on issues may reflect that. By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-11-06 01:33:43.905-0600 Full log By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-11-06 01:34:18.966-0600 cdr csv log By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-11-06 01:35:16.460-0600 cdr config file By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-11-06 01:37:06.625-0600 about the system By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-11-06 01:39:49.658-0600 Thank you, I understand everything. Attach the requested files. By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-11-06 01:43:44.458-0600 Done. By: Matt Jordan (mjordan) 2014-11-06 08:59:50.004-0600 The debug information requested doesn't actually show what is needed. When Asterisk starts with {{cdr_mysql}}, it reads in the configuration file and will emit - as a debug message - how it will interpret the timezone. Please provide a log showing Asterisk starting. Note that a debug log should show all levels, that is: {noformat} mylog => debug,verbose,notice,warning,error {noformat} By: Matt Jordan (mjordan) 2014-11-06 09:02:22.188-0600 Also: try the config option "cdrzone" instead of "timezone": {noformat} cdrzone=UTC {noformat} Looking at the patch which introduced this feature (r239152), it appears as if the sample config was updated incorrectly. By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-11-07 02:06:34.589-0600 Log By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-11-07 02:07:03.830-0600 Tried option "cdrzone=UTC", did not help. Here's the log start. By: Matt Jordan (mjordan) 2014-11-07 09:10:11.550-0600 The log file you attached is not a debug log file. Please generate a log file using the instructions I provided: {quote} Note that a debug log should show all levels, that is: {noformat} mylog => debug,verbose,notice,warning,error {noformat} {quote} By: Rusty Newton (rnewton) 2014-11-21 14:53:40.665-0600 Vitaliy be sure you are turning the debug level up past 0. That is, use "core set debug 5" to set the debug verbosity. By: Rusty Newton (rnewton) 2014-12-09 08:51:03.407-0600 We haven't had a response in a while, but I know there are holidays around this time of year so I'll leave this open a bit longer. Vitaliy are you able to provide the debug requested? By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-12-09 08:54:24.932-0600 Yes of course, I'm sorry for the delay. I will try tomorrow. By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-12-10 08:34:07.894-0600 set 5 level debug By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-12-10 08:34:38.282-0600 set 9 level debug By: Vitaliy Gerdt (Vitaliy Gerdt) 2014-12-10 08:37:37.885-0600 Once again I apologize for the wait. In an attachment, 2 log file with debug level 5 and 9 level debug. Both files were recorded using the string "mylog => debug,verbose,notice,warning,error" in the config file logger.conf By: Rusty Newton (rnewton) 2014-12-16 20:23:53.941-0600 Hmm. I don't know what is going on. cdr_mysql has been deprecated a while and this issue will be closed unless we have a large amount of people report the same issue and a patch is submitted. At least now, with your debug posted here, an interested party could look into it. The path forward is for you to test with the module that is core supported - *cdr_adaptive_odbc*. If the issue still occurs with cdr_adaptive_odbc then you can open up a new issue for that module. Thanks, By: Rusty Newton (rnewton) 2014-12-16 20:25:09.541-0600 A note: you might try asking about this on the [users mailing list|http://www.asterisk.org/community/discuss] to see if anyone who still uses cdr_mysql may be able to help. |