diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /util/datetime/base.cpp | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'util/datetime/base.cpp')
-rw-r--r-- | util/datetime/base.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/datetime/base.cpp b/util/datetime/base.cpp index 38ecc3ab96..f0df9b1b40 100644 --- a/util/datetime/base.cpp +++ b/util/datetime/base.cpp @@ -5,17 +5,17 @@ #include <util/stream/mem.h> #include <util/system/compat.h> #include <util/memory/tempbuf.h> -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/generic/strbuf.h> #include <util/generic/yexception.h> -TString Strftime(const char* format, const struct tm* tm) { +TString Strftime(const char* format, const struct tm* tm) { size_t size = Max<size_t>(strlen(format) * 2 + 1, 107); for (;;) { TTempBuf buf(size); int r = strftime(buf.Data(), buf.Size(), format, tm); if (r != 0) { - return TString(buf.Data(), r); + return TString(buf.Data(), r); } size *= 2; } @@ -173,11 +173,11 @@ void Out<::NPrivate::TPrintableLocalTime<true, true>>(IOutputStream& os, TTypeTr WritePrintableLocalTimeToStream(os, localTime); } -TString TDuration::ToString() const { +TString TDuration::ToString() const { return ::ToString(*this); } -TString TInstant::ToString() const { +TString TInstant::ToString() const { return ::ToString(*this); } @@ -185,20 +185,20 @@ TString TInstant::ToRfc822String() const { return FormatGmTime("%a, %d %b %Y %H:%M:%S GMT"); } -TString TInstant::ToStringUpToSeconds() const { +TString TInstant::ToStringUpToSeconds() const { char buf[64]; auto len = FormatDate8601(buf, sizeof(buf), TimeT()); if (!len) { ythrow yexception() << "TInstant::ToStringUpToSeconds: year does not fit into an integer"; } - return TString(buf, len); + return TString(buf, len); } TString TInstant::ToIsoStringLocal() const { return ::ToString(FormatIsoLocal(*this)); } -TString TInstant::ToStringLocal() const { +TString TInstant::ToStringLocal() const { return ::ToString(FormatLocal(*this)); } @@ -210,7 +210,7 @@ TString TInstant::ToIsoStringLocalUpToSeconds() const { return ::ToString(FormatIsoLocalUpToSeconds(*this)); } -TString TInstant::ToStringLocalUpToSeconds() const { +TString TInstant::ToStringLocalUpToSeconds() const { return ::ToString(FormatLocalUpToSeconds(*this)); } |