[asterisk-commits] tilghman: branch 1.4 r113117 - /branches/1.4/funcs/func_strings.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 7 12:51:50 CDT 2008


Author: tilghman
Date: Mon Apr  7 12:51:49 2008
New Revision: 113117

URL: http://svn.digium.com/view/asterisk?view=rev&rev=113117
Log:
Force ast_mktime() to check for DST, since strptime(3) does not.
(Closes issue #12374)

Modified:
    branches/1.4/funcs/func_strings.c

Modified: branches/1.4/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/funcs/func_strings.c?view=diff&rev=113117&r1=113116&r2=113117
==============================================================================
--- branches/1.4/funcs/func_strings.c (original)
+++ branches/1.4/funcs/func_strings.c Mon Apr  7 12:51:49 2008
@@ -499,6 +499,8 @@
 	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));
 	}
 




More information about the asterisk-commits mailing list