aboutsummaryrefslogtreecommitdiffstats
path: root/cdr/cdr_adaptive_odbc.c
diff options
context:
space:
mode:
Diffstat (limited to 'cdr/cdr_adaptive_odbc.c')
-rw-r--r--cdr/cdr_adaptive_odbc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cdr/cdr_adaptive_odbc.c b/cdr/cdr_adaptive_odbc.c
index 244a0380c..edc01e7dd 100644
--- a/cdr/cdr_adaptive_odbc.c
+++ b/cdr/cdr_adaptive_odbc.c
@@ -373,9 +373,9 @@ static int odbc_log(struct ast_cdr *cdr)
/* Check if we have a similarly named variable */
if (datefield && tableptr->usegmtime) {
- struct timeval tv = (datefield == 1) ? cdr->start : (datefield == 2) ? cdr->answer : cdr->end;
+ struct timeval date_tv = (datefield == 1) ? cdr->start : (datefield == 2) ? cdr->answer : cdr->end;
struct ast_tm tm = { 0, };
- ast_localtime(&tv, &tm, "UTC");
+ ast_localtime(&date_tv, &tm, "UTC");
ast_strftime(colbuf, sizeof(colbuf), "%Y-%m-%d %H:%M:%S", &tm);
} else {
ast_cdr_getvar(cdr, entry->cdrname, &colptr, colbuf, sizeof(colbuf), 0, datefield ? 0 : 1);