mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Add schedule extensions to app_meetme. In addition, the reporter found a
problem within strptime(3), which we are correcting here with ast_strptime(). (closes issue #11040) Reported by: DEA Patches: 20080910__bug11040.diff.txt uploaded by Corydon76 (license 14) Tested by: DEA git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1819,3 +1819,15 @@ defcase: *fptr++ = *tmp;
|
||||
return res;
|
||||
}
|
||||
|
||||
char *ast_strptime(const char *s, const char *format, struct ast_tm *tm)
|
||||
{
|
||||
struct tm tm2 = { 0, };
|
||||
char *res = strptime(s, format, &tm2);
|
||||
memcpy(tm, &tm2, sizeof(*tm));
|
||||
tm->tm_usec = 0;
|
||||
/* strptime(3) doesn't set .tm_isdst correctly, so to force ast_mktime(3)
|
||||
* to deal with it correctly, we set it to -1. */
|
||||
tm->tm_isdst = -1;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user