aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-07 17:51:49 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-07 17:51:49 +0000
commit310e77ff9e7956200aad94bd36e751b884a12eb5 (patch)
tree5ab9ce533a9b9fcbe366ddfa61d5b9c980e608eb /funcs
parent3da5e78b99c4ed62f3eb6e9304ead2b11cfd524c (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')
-rw-r--r--funcs/func_strings.c2
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));
}