module/clock: user can now specify the date/time format strings

This commit is contained in:
Daniel Eklöf 2019-01-09 18:41:16 +01:00
parent 9037aadd04
commit 7fc9749c28
4 changed files with 33 additions and 8 deletions

View file

@ -313,7 +313,14 @@ verify_module_clock(keychain_t *chain, const struct yml_node *node)
return false;
}
if (strcmp(key, "content") == 0) {
if (strcmp(key, "date-format") == 0 ||
strcmp(key, "time-format") == 0)
{
if (!verify_string(chain_push(chain, key), it.value))
return false;
}
else if (strcmp(key, "content") == 0) {
if (!verify_particle(chain_push(chain, key), it.value))
return false;
}