diff options
Diffstat (limited to 'cdr/cdr_radius.c')
-rw-r--r-- | cdr/cdr_radius.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cdr/cdr_radius.c b/cdr/cdr_radius.c index ff380a13a..c41d680dd 100644 --- a/cdr/cdr_radius.c +++ b/cdr/cdr_radius.c @@ -146,7 +146,7 @@ static int build_radius_record(VALUE_PAIR **send, struct ast_cdr *cdr) if (ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME)) gmtime_r(&(cdr->start.tv_sec), &tm); else - localtime_r(&(cdr->start.tv_sec), &tm); + ast_localtime(&(cdr->start.tv_sec), &tm, NULL); strftime(timestr, sizeof(timestr), DATE_FORMAT, &tm); if (!rc_avpair_add(rh, send, PW_AST_START_TIME, timestr, strlen(timestr), VENDOR_CODE)) return -1; @@ -155,7 +155,7 @@ static int build_radius_record(VALUE_PAIR **send, struct ast_cdr *cdr) if (ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME)) gmtime_r(&(cdr->answer.tv_sec), &tm); else - localtime_r(&(cdr->answer.tv_sec), &tm); + ast_localtime(&(cdr->answer.tv_sec), &tm, NULL); strftime(timestr, sizeof(timestr), DATE_FORMAT, &tm); if (!rc_avpair_add(rh, send, PW_AST_ANSWER_TIME, timestr, strlen(timestr), VENDOR_CODE)) return -1; @@ -164,7 +164,7 @@ static int build_radius_record(VALUE_PAIR **send, struct ast_cdr *cdr) if (ast_test_flag(&global_flags, RADIUS_FLAG_USEGMTIME)) gmtime_r(&(cdr->end.tv_sec), &tm); else - localtime_r(&(cdr->end.tv_sec), &tm); + ast_localtime(&(cdr->end.tv_sec), &tm, NULL); strftime(timestr, sizeof(timestr), DATE_FORMAT, &tm); if (!rc_avpair_add(rh, send, PW_AST_END_TIME, timestr, strlen(timestr), VENDOR_CODE)) return -1; |