diff options
author | iseg <iseg@yandex-team.ru> | 2022-02-10 16:49:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:39 +0300 |
commit | f828a15ab90e9ca8e848f83caf95c95f06be46e7 (patch) | |
tree | de25241f7ec727b05ff1e5b9e1336f567f788a44 /util/datetime | |
parent | 8124e2bb214b063687e0d77c900150c727e16782 (diff) | |
download | ydb-f828a15ab90e9ca8e848f83caf95c95f06be46e7.tar.gz |
Restoring authorship annotation for <iseg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/datetime')
-rw-r--r-- | util/datetime/base.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/datetime/base.h b/util/datetime/base.h index 5e902b8f63..2034c2ca8c 100644 --- a/util/datetime/base.h +++ b/util/datetime/base.h @@ -44,18 +44,18 @@ class TDateTimeParseException: public yexception { }; const int DATE_BUF_LEN = 4 + 2 + 2 + 1; // [YYYYMMDD*] - + constexpr long seconds(const struct tm& theTm) { return 60 * (60 * theTm.tm_hour + theTm.tm_min) + theTm.tm_sec; -} - +} + void sprint_gm_date(char* buf, time_t when, long* sec = nullptr); bool sscan_date(const char* date, struct tm& theTm); - + const int DATE_8601_LEN = 21; // strlen("YYYY-MM-DDThh:mm:ssZ") = 20 + '\0' size_t FormatDate8601(char* buf, size_t len, time_t when); - + inline void sprint_date8601(char* buf, time_t when) { buf[FormatDate8601(buf, 64, when)] = 0; } |