Browse Source

Mingw32 doesn't support strptime so use sscanf.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
71eff46098
  1. 2
      main.c

2
main.c

@ -1095,7 +1095,7 @@ static char *enable_debug(bool *flag) @@ -1095,7 +1095,7 @@ static char *enable_debug(bool *flag)
static char *set_schedtime(const char *arg, struct schedtime *st)
{
if (!strptime(arg, "%H:%M", &st->tm))
if (sscanf(arg, "%d:%d", &st->tm.tm_hour, &st->tm.tm_min) != 2)
return "Invalid time set, should be HH:MM";
st->enable = true;
return NULL;

Loading…
Cancel
Save