diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-18 19:47:20 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-18 19:47:20 +0000 |
commit | 74c2948c2299773fd3816af43e06e3bdf714ba3a (patch) | |
tree | 540f82bac3e6105b6fc34cd4b4613c1756a7512b /funcs/func_timeout.c | |
parent | fd471b4a0cbb2abd7b4c8f30fee850cedefedaa1 (diff) |
Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_timeout.c')
-rw-r--r-- | funcs/func_timeout.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c index 1da11e54a..ec730c819 100644 --- a/funcs/func_timeout.c +++ b/funcs/func_timeout.c @@ -92,7 +92,7 @@ static int timeout_write(struct ast_channel *chan, const char *cmd, char *data, { int x; char timestr[64]; - struct tm myt; + struct ast_tm myt; if (!chan) return -1; @@ -113,8 +113,9 @@ static int timeout_write(struct ast_channel *chan, const char *cmd, char *data, ast_channel_setwhentohangup(chan, x); if (option_verbose > 2) { if (chan->whentohangup) { - strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S UTC", - gmtime_r(&chan->whentohangup, &myt)); + struct timeval tv = { chan->whentohangup, 0 }; + ast_strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S.%3q %Z", + ast_localtime(&tv, &myt, NULL)); ast_verbose(VERBOSE_PREFIX_3 "Channel will hangup at %s.\n", timestr); } else { |