- TW-1522 Date format doesn't like hyphens (thanks to Scott Carter).
This commit is contained in:
Paul Beckingham 2015-01-25 14:49:02 -05:00
parent 4865269630
commit 6626207ad1
11 changed files with 30 additions and 10 deletions

View file

@ -41,6 +41,7 @@
std::string Variant::dateFormat = "";
bool Variant::searchCaseSensitive = true;
bool Variant::searchUsingRegex = true;
bool Variant::isoEnabled = true;
////////////////////////////////////////////////////////////////////////////////
Variant::Variant ()
@ -2065,7 +2066,8 @@ void Variant::cast (const enum type new_type)
ISO8601d iso;
std::string::size_type pos = 0;
if (iso.parse (_string, pos) &&
if (isoEnabled &&
iso.parse (_string, pos) &&
pos == _string.length ())
{
_date = (time_t) iso;