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 | 8b71ce88bea710a9663bb143e4916f961c57212e (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/datetime | |
parent | f828a15ab90e9ca8e848f83caf95c95f06be46e7 (diff) | |
download | ydb-8b71ce88bea710a9663bb143e4916f961c57212e.tar.gz |
Restoring authorship annotation for <iseg@yandex-team.ru>. Commit 2 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 2034c2ca8c..5e902b8f63 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; } |