aboutsummaryrefslogtreecommitdiffstats
path: root/cdr/cdr_radius.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-14 21:50:40 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-14 21:50:40 +0000
commita45f0ce8a0fded7acff845122856b8b92e8a1e00 (patch)
tree970b4536445781a1e3046fb0f2fc3c1d10eab080 /cdr/cdr_radius.c
parenteaff648d9b225be366870aade0617c6d8ca2a121 (diff)
use ast_localtime() in every place localtime_r() was being used
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@69392 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr/cdr_radius.c')
-rw-r--r--cdr/cdr_radius.c6
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;