[svn-commits] tilghman: branch 1.6.0 r113173 - in /branches/1.6.0: ./ funcs/func_strings.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Apr 7 14:08:46 CDT 2008


Author: tilghman
Date: Mon Apr  7 14:08:45 2008
New Revision: 113173

URL: http://svn.digium.com/view/asterisk?view=rev&rev=113173
Log:
Merged revisions 113172 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r113172 | tilghman | 2008-04-07 14:06:46 -0500 (Mon, 07 Apr 2008) | 11 lines

Merged revisions 113117 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113117 | tilghman | 2008-04-07 12:51:49 -0500 (Mon, 07 Apr 2008) | 3 lines

Force ast_mktime() to check for DST, since strptime(3) does not.
(Closes issue #12374)

........

................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/funcs/func_strings.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/funcs/func_strings.c?view=diff&rev=113173&r1=113172&r2=113173
==============================================================================
--- branches/1.6.0/funcs/func_strings.c (original)
+++ branches/1.6.0/funcs/func_strings.c Mon Apr  7 14:08:45 2008
@@ -704,7 +704,10 @@
 	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);
 	}
 




More information about the svn-commits mailing list