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 9f9a4470a..6d890e764 100644 --- a/cdr/cdr_radius.c +++ b/cdr/cdr_radius.c @@ -145,7 +145,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; @@ -154,7 +154,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; @@ -163,7 +163,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; |