diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-07 17:51:49 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-07 17:51:49 +0000 |
commit | 310e77ff9e7956200aad94bd36e751b884a12eb5 (patch) | |
tree | 5ab9ce533a9b9fcbe366ddfa61d5b9c980e608eb /funcs/func_strings.c | |
parent | 3da5e78b99c4ed62f3eb6e9304ead2b11cfd524c (diff) |
Force ast_mktime() to check for DST, since strptime(3) does not.
(Closes issue #12374)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@113117 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_strings.c')
-rw-r--r-- | funcs/func_strings.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/funcs/func_strings.c b/funcs/func_strings.c index b01bec712..10c274efd 100644 --- a/funcs/func_strings.c +++ b/funcs/func_strings.c @@ -499,6 +499,8 @@ static int acf_strptime(struct ast_channel *chan, char *cmd, char *data, if (!strptime(args.timestring, args.format, &time)) { ast_log(LOG_WARNING, "C function strptime() output nothing?!!\n"); } else { + /* Since strptime(3) does not check DST, force ast_mktime() to calculate it. */ + time.tm_isdst = -1; snprintf(buf, len, "%d", (int) ast_mktime(&time, args.timezone)); } |