Merge branch 'develop' into main

This commit is contained in:
tastytea 2019-11-27 09:19:51 +01:00
commit 17f0398b1f
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 3 additions and 4 deletions

View File

@ -84,8 +84,7 @@ string Search::to_lowercase(const string &str) const
}
list<Database::entry> Search::search_tags(const string &expression,
const bool is_re)
const
const bool is_re) const
{
vector<vector<string>> searchlist = parse_expression(expression);
list<Database::entry> result;

View File

@ -30,7 +30,7 @@ time_point string_to_timepoint(const string &strtime, bool sqlite)
{
std::stringstream sstime(strtime);
struct std::tm tm = {};
tm.tm_isdst = -1; // Detect daylight saving time.
tm.tm_isdst = -1; // Don't convert to/from daylight saving time.
if (sqlite)
{
sstime >> std::get_time(&tm, "%Y-%m-%d %T");
@ -39,7 +39,7 @@ time_point string_to_timepoint(const string &strtime, bool sqlite)
{
sstime >> std::get_time(&tm, "%Y-%m-%dT%T");
}
std::time_t time = timelocal(&tm); // Assume time is local.
std::time_t time = mktime(&tm);
return system_clock::from_time_t(time);
}