summaryrefslogtreecommitdiff
path: root/main/stdtime
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-10-01 23:02:25 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-10-01 23:02:25 +0000
commit529874de7bf5ca57b2f6c662a9cb4cbfa28dbd74 (patch)
treee5cb3c65a8b2815e66815465a16225d0a82458d6 /main/stdtime
parent7eae109418777f15f5a3ddfaa6542d594d1874ad (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: https://origsvn.digium.com/svn/asterisk/trunk@145649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/stdtime')
-rw-r--r--main/stdtime/localtime.c12
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;
+}
+