aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_strings.c')
-rw-r--r--funcs/func_strings.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index 45d476ef2..f50ea245d 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -704,7 +704,10 @@ static int acf_strptime(struct ast_channel *chan, const char *cmd, char *data,
if (!strptime(args.timestring, args.format, &t.time)) {
ast_log(LOG_WARNING, "C function strptime() output nothing?!!\n");
} else {
- struct timeval tv = ast_mktime(&t.atm, args.timezone);
+ struct timeval tv;
+ /* Since strptime(3) does not check DST, force ast_mktime() to calculate it. */
+ t.atm.tm_isdst = -1;
+ tv = ast_mktime(&t.atm, args.timezone);
snprintf(buf, len, "%d", (int) tv.tv_sec);
}