diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-01 23:02:25 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-01 23:02:25 +0000 |
commit | 0c8cf106ef2b81fddbc9839476f0c666e86bae48 (patch) | |
tree | e5cb3c65a8b2815e66815465a16225d0a82458d6 /main/stdtime | |
parent | e938c5abe7710472e1a350e34bf0e246749ff543 (diff) |
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: http://svn.digium.com/svn/asterisk/trunk@145649 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/stdtime')
-rw-r--r-- | main/stdtime/localtime.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/main/stdtime/localtime.c b/main/stdtime/localtime.c index b25b8ab14..389107cb7 100644 --- a/main/stdtime/localtime.c +++ b/main/stdtime/localtime.c @@ -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; +} + |