New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
acc: save cdr entries in UTC #1358
Labels
Comments
A PR is more than welcome -- but no need for a new param, I think you can just reuse the exiting param and extend the functionality for cdrs -- I do not see a reason to have acc records in local time and cdrs in utc or the other way around. |
cruzccl
added a commit
to cruzccl/kamailio
that referenced
this issue
Dec 14, 2017
acc.time_mode modparam allows saving acc transactions time field using the output of gmtime() when it is set to 4. This commit aims to reuse this modparam for cdr entries, storing start_time and end_time in gmtime if time_mode is 4. Fixes kamailio#1358
cruzccl
added a commit
to cruzccl/kamailio
that referenced
this issue
Dec 14, 2017
- reuse acc.time_mode modparam for cdr entries, storing start_time and end_time in gmtime if time_mode is 4. GH kamailio#1358
10 tasks
cruzccl
added a commit
to cruzccl/kamailio
that referenced
this issue
Dec 15, 2017
- reuse acc.time_mode modparam for cdr entries, storing start_time and end_time in gmtime if time_mode is 4. GH kamailio#1358
Done with the merge of commits referenced above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
ACC module allows setting datetime fields in UTC via time_mode param.
However, this setting does not cause cdr entries to be saved in that format and I haven't found any equivalent parameter to achieve this.
Troubleshooting
Analyzing the code for MySQL database storage I have found that db_time2str_ex function defined in db_ut.c uses localtime().
Possible Solutions
Changing localtime() to gmtime() cdrs are saved in UTC, but it would be desirable to add a new module param that makes this configurable.
Additional Information
kamailio -v
Should I proceed and try to get a working PR to add this new modparam or there is currently a way to get this that I have missed (apart from setting system time to UTC)?
Thank you and regards,
The text was updated successfully, but these errors were encountered: