diff --git a/include/timeutils.h b/include/timeutils.h index 962c1c946..c6a23bebd 100644 --- a/include/timeutils.h +++ b/include/timeutils.h @@ -29,10 +29,9 @@ namespace Duration * seconds. If called with this duration 33,019,565 will be returned. * * @param str A string containing a duration. - * @param base The base time to use for leap year calculation. * @return Either the number of seconds in the duration or 0 on error. */ - CoreExport unsigned long From(const std::string& str, time_t base = 0); + CoreExport unsigned long From(const std::string& str); /** Determines whether a duration string is valid. * @param str The duration string to check. @@ -58,7 +57,7 @@ namespace Duration * @param base The base time to use for leap year calculation. * @return True if the conversion succeeded; otherwise, false. */ - CoreExport bool TryFrom(const std::string& str, unsigned long& duration, time_t base = 0); + CoreExport bool TryFrom(const std::string& str, unsigned long& duration); } namespace Time diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index c81a9fa0f..eaacee665 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -403,7 +403,7 @@ static constexpr unsigned int duration_multi[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -bool Duration::TryFrom(const std::string& str, unsigned long& duration, time_t base) +bool Duration::TryFrom(const std::string& str, unsigned long& duration) { unsigned long total = 0; unsigned long subtotal = 0; @@ -437,7 +437,7 @@ bool Duration::TryFrom(const std::string& str, unsigned long& duration, time_t b return true; } -unsigned long Duration::From(const std::string& str, time_t base) +unsigned long Duration::From(const std::string& str) { unsigned long out = 0; Duration::TryFrom(str, out, base);