Merge pull request #2749 from MatthewGentoo/utils-datetime-max
lib: use time_t_max for empty datetime
This commit is contained in:
@ -493,7 +493,7 @@ Mu::parse_date_time(const std::string& dstr, bool is_first, bool utc)
|
|||||||
|
|
||||||
/* one-sided dates */
|
/* one-sided dates */
|
||||||
if (dstr.empty())
|
if (dstr.empty())
|
||||||
return is_first ? 0 : G_MAXINT64;
|
return is_first ? time_t_min : time_t_max;
|
||||||
else if (dstr == "today" || dstr == "now")
|
else if (dstr == "today" || dstr == "now")
|
||||||
return special_date_time(dstr, is_first);
|
return special_date_time(dstr, is_first);
|
||||||
else if (dstr.find_first_of("ymdwhMs") != std::string::npos)
|
else if (dstr.find_first_of("ymdwhMs") != std::string::npos)
|
||||||
|
|||||||
Reference in New Issue
Block a user