diff options
author | nga <nga@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:09 +0300 |
commit | 1f553f46fb4f3c5eec631352cdd900a0709016af (patch) | |
tree | a231fba2c03b440becaea6c86a2702d0bfb0336e /util/datetime/base.cpp | |
parent | c4de7efdedc25b49cbea74bd589eecb61b55b60a (diff) | |
download | ydb-1f553f46fb4f3c5eec631352cdd900a0709016af.tar.gz |
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/datetime/base.cpp')
-rw-r--r-- | util/datetime/base.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/datetime/base.cpp b/util/datetime/base.cpp index 38ecc3ab96..f61b7b889f 100644 --- a/util/datetime/base.cpp +++ b/util/datetime/base.cpp @@ -1,26 +1,26 @@ #include "base.h" - -#include <util/string/cast.h> + +#include <util/string/cast.h> #include <util/stream/output.h> #include <util/stream/mem.h> -#include <util/system/compat.h> +#include <util/system/compat.h> #include <util/memory/tempbuf.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) { size_t size = Max<size_t>(strlen(format) * 2 + 1, 107); - for (;;) { + for (;;) { TTempBuf buf(size); - int r = strftime(buf.Data(), buf.Size(), format, tm); + int r = strftime(buf.Data(), buf.Size(), format, tm); if (r != 0) { return TString(buf.Data(), r); } - size *= 2; - } -} - + size *= 2; + } +} + template <> TDuration FromStringImpl<TDuration, char>(const char* s, size_t len) { return TDuration::Parse(TStringBuf(s, len)); |