diff --git a/src/ISO8601.cpp b/src/ISO8601.cpp index 7d85ef10c..f40232906 100644 --- a/src/ISO8601.cpp +++ b/src/ISO8601.cpp @@ -586,13 +586,16 @@ ISO8601p::ISO8601p () //////////////////////////////////////////////////////////////////////////////// ISO8601p::ISO8601p (time_t input) -: _value (input) { + clear (); + _value = input; } //////////////////////////////////////////////////////////////////////////////// ISO8601p::ISO8601p (const std::string& input) { + clear (); + if (Lexer::isAllDigits (input)) { time_t value = (time_t) strtol (input.c_str (), NULL, 10);