Date/ISO8601

- Changed the order of parsing from ISO, Date to Date, ISO. This favors the
  old dateformat mechanism more than the new one. One day this will flip.
This commit is contained in:
Paul Beckingham 2014-06-01 00:10:16 -04:00
parent 483c1b5787
commit 6706d1b955
3 changed files with 11 additions and 11 deletions

View file

@ -1678,21 +1678,21 @@ void Variant::cast (const enum type new_type)
case type_duration:
{
_duration = 0;
ISO8601p iso;
Duration dur;
std::string::size_type pos = 0;
if (iso.parse (_string, pos) &&
if (dur.parse (_string, pos) &&
pos == _string.length ())
{
_duration = (time_t) iso;
_duration = (time_t) dur;
}
else
{
Duration dur;
ISO8601p iso;
pos = 0;
if (dur.parse (_string, pos) &&
if (iso.parse (_string, pos) &&
pos == _string.length ())
{
_duration = (time_t) dur;
_duration = (time_t) iso;
}
}
}