use ast_localtime() in every place localtime_r() was being used

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@69392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2007-06-14 21:50:40 +00:00
parent 45ad7fcec8
commit ae82d97c6d
18 changed files with 80 additions and 54 deletions

View File

@@ -2111,7 +2111,7 @@ static int get_date(char *s, int len)
struct tm tm;
time_t t;
t = time(0);
localtime_r(&t,&tm);
ast_localtime(&t, &tm, NULL);
return strftime(s, len, "%a %b %e %r %Z %Y", &tm);
}
@@ -4223,10 +4223,10 @@ static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *v
/* No internal variable parsing for now, so we'll comment it out for the time being */
#if 0
/* Set the DIFF_* variables */
localtime_r(&t, &time_now);
ast_localtime(&t, &time_now, NULL);
tv_now = ast_tvnow();
tnow = tv_now.tv_sec;
localtime_r(&tnow,&time_then);
ast_localtime(&tnow, &time_then, NULL);
/* Day difference */
if (time_now.tm_year == time_then.tm_year)