diff options
Diffstat (limited to 'apps/app_sms.c')
-rw-r--r-- | apps/app_sms.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/app_sms.c b/apps/app_sms.c index a11244fc9..7b9c23063 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -815,13 +815,9 @@ static void sms_readfile(sms_t * h, char *fn) else if (!strcmp(line, "rp")) h->rp = (atoi(p) ? 1 : 0); else if (!strcmp(line, "scts")) { /* get date/time */ - int Y, - m, - d, - H, - M, - S; - if (sscanf (p, "%d-%d-%dT%d:%d:%d", &Y, &m, &d, &H, &M, &S) == 6) { + int Y, m, d, H, M, S; + /* XXX Why aren't we using ast_strptime here? */ + if (sscanf(p, "%4d-%2d-%2dT%2d:%2d:%2d", &Y, &m, &d, &H, &M, &S) == 6) { struct ast_tm t = { 0, }; t.tm_year = Y - 1900; t.tm_mon = m - 1; |