+ if (time (&now) == (time_t) -1) {
+ msg = "unable to get current time";
+ return NOTMUCH_STATUS_ILLEGAL_ARGUMENT;
+ }
+
+ if (! begin.empty ()) {
+ if (parse_time_string (begin.c_str (), &parsed_time, &now, PARSE_TIME_ROUND_DOWN)) {
+ msg = "Didn't understand date specification '" + begin + "'";
+ return NOTMUCH_STATUS_BAD_QUERY_SYNTAX;
+ }