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

version: kamailio 4.4.6 (x86_64/linux) 0a8379-dirty
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 0a8379 -dirty
compiled on 17:01:42 Dec  4 2017 with gcc 6.3.0

Linux 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux

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,


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.