diff --git a/ChangeLog b/ChangeLog index 0b864c290..84d6af4d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -191,6 +191,7 @@ Boß). - TW-1469 Case-insensitive searching broken on Cygwin (thanks to Richard Boß). +- TW-1471 task calc uses output it doesn't understand (thanks to Jens Erat). - Added new holidays.xy-XY.rc definition files - Removed deprecated 'echo.command' setting, in favor of the 'header' and 'affected' verbosity tokens. diff --git a/src/CLI.cpp b/src/CLI.cpp index c5b1fee1b..fdce9fc52 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -647,7 +647,7 @@ void CLI::addArg (const std::string& arg) isID (raw) || // isPattern (raw) || // ///[g] - isAttribute (raw) || // [.[~]]: + isAttribute (raw) || // [.[~]]: isOperator (raw)) // { _original_args.push_back (raw); diff --git a/src/Variant.cpp b/src/Variant.cpp index a08bf6e10..614df705f 100644 --- a/src/Variant.cpp +++ b/src/Variant.cpp @@ -2062,21 +2062,19 @@ void Variant::cast (const enum type new_type) case type_date: { _date = 0; - if (dateFormat != "") + + ISO8601d iso; + std::string::size_type pos = 0; + if (iso.parse (_string, pos) && + pos == _string.length ()) + { + _date = (time_t) iso; + } + else if (dateFormat != "") { Date d (_string, dateFormat); _date = d.toEpoch (); } - else - { - ISO8601d iso; - std::string::size_type pos = 0; - if (iso.parse (_string, pos) && - pos == _string.length ()) - { - _date = (time_t) iso; - } - } } break; case type_duration: