mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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:
@@ -1828,7 +1828,7 @@ static char *cli_prompt(EditLine *el)
|
||||
case 'd': /* date */
|
||||
memset(&tm, 0, sizeof(tm));
|
||||
time(&ts);
|
||||
if (localtime_r(&ts, &tm)) {
|
||||
if (ast_localtime(&ts, &tm, NULL)) {
|
||||
strftime(p, sizeof(prompt) - strlen(prompt), "%Y-%m-%d", &tm);
|
||||
}
|
||||
break;
|
||||
@@ -1888,7 +1888,7 @@ static char *cli_prompt(EditLine *el)
|
||||
case 't': /* time */
|
||||
memset(&tm, 0, sizeof(tm));
|
||||
time(&ts);
|
||||
if (localtime_r(&ts, &tm)) {
|
||||
if (ast_localtime(&ts, &tm, NULL)) {
|
||||
strftime(p, sizeof(prompt) - strlen(prompt), "%H:%M:%S", &tm);
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user