X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/f8e103acc087dbe46851d12b3e2503635108c0ac..8f46a826a07310dbd76e4b3a15f63ae055272542:/stglibs/conffiles.lib/conffiles.cpp?ds=sidebyside diff --git a/stglibs/conffiles.lib/conffiles.cpp b/stglibs/conffiles.lib/conffiles.cpp index ed2e4447..9578e24f 100644 --- a/stglibs/conffiles.lib/conffiles.cpp +++ b/stglibs/conffiles.lib/conffiles.cpp @@ -35,6 +35,7 @@ #include // E* #include +#include #include #include @@ -69,7 +70,7 @@ if (pos != std::string::npos) return val; } //--------------------------------------------------------------------------- -std::string Trim(std::string val) +std::string Trim(const std::string& val) { return TrimR(TrimL(val)); } @@ -345,6 +346,14 @@ param_val[param] = buf; changed = true; } //--------------------------------------------------------------------------- +void CONFIGFILE::WriteTime(const std::string & param, time_t val) +{ +std::stringstream ss; +ss<::const_iterator it(param_val.find(param));