From: Mikko Rasa Date: Sat, 31 Aug 2024 08:49:42 +0000 (+0300) Subject: Make Time::format_now use the local timezone X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4099cb30168b3cdfadf786d80d3878e096548458;p=libs%2Fcore.git Make Time::format_now use the local timezone --- diff --git a/source/time/utils.cpp b/source/time/utils.cpp index 52c8934..0b2b165 100644 --- a/source/time/utils.cpp +++ b/source/time/utils.cpp @@ -1,5 +1,6 @@ #include "datetime.h" #include "timestamp.h" +#include "timezone.h" #include "utils.h" using namespace std; @@ -9,7 +10,7 @@ namespace Time { string format_now(const string &fmt) { - return DateTime(now()).format(fmt); + return DateTime(now(), TimeZone::local()).format(fmt); } } // namespace Time