diff --git a/src/Att.cpp b/src/Att.cpp index f7e92adcd..65b2efb59 100644 --- a/src/Att.cpp +++ b/src/Att.cpp @@ -236,7 +236,6 @@ bool Att::validNameValue ( autoComplete (name, candidates, matches); if (matches.size () == 0) -// throw std::string ("Unrecognized attribute '") + name + "'"; return false; else if (matches.size () != 1) @@ -559,7 +558,7 @@ bool Att::match (const Att& other) const } else if (which == "date") { - Date literal (mValue); + Date literal ((time_t)::atoi (mValue.c_str ())); Date variable ((time_t)::atoi (other.mValue.c_str ())); if (! (variable < literal)) return false; @@ -589,7 +588,7 @@ bool Att::match (const Att& other) const } else if (which == "date") { - Date literal (mValue); + Date literal ((time_t)::atoi (mValue.c_str ())); Date variable ((time_t)::atoi (other.mValue.c_str ())); if (! (variable > literal)) return false; diff --git a/src/Context.cpp b/src/Context.cpp index e51da9f96..a4752d78c 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -552,12 +552,7 @@ void Context::parse ( // At this point, either a sequence or a command should have been found. if (parseSequence.size () == 0 && parseCmd.command == "") - { parseCmd.parse (descCandidate); - throw stringtable.get ( - CMD_MISSING, - "You must specify a command, or a task ID to modify"); - } // Read-only command (reports, status, info ...) use filters. Write commands // (add, done ...) do not. @@ -580,6 +575,10 @@ void Context::parse ( initialize (); parse (args, cmd, task, sequence, subst, filter); } + else + throw stringtable.get ( + CMD_MISSING, + "You must specify a command, or a task ID to modify"); } }