aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorkostyagin <kostyagin@yandex-team.ru>2022-02-10 16:51:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:51:59 +0300
commit9a6bfabe488957bae27bc40283cf4a8ed3fb24f7 (patch)
treea99a9a07042da1eab8eb00cfd8698ef1ee45eebe /util
parent9ee55d96b694910be2c102176bc8dda3bdd158f0 (diff)
downloadydb-9a6bfabe488957bae27bc40283cf4a8ed3fb24f7.tar.gz
Restoring authorship annotation for <kostyagin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/draft/date.cpp2
-rw-r--r--util/draft/date.h22
2 files changed, 12 insertions, 12 deletions
diff --git a/util/draft/date.cpp b/util/draft/date.cpp
index a290c46050..4a766c4ee5 100644
--- a/util/draft/date.cpp
+++ b/util/draft/date.cpp
@@ -9,7 +9,7 @@ time_t GetDateStart(time_t ts) {
memset(&dateTm, 0, sizeof(tm));
localtime_r(&ts, &dateTm);
- dateTm.tm_isdst = -1;
+ dateTm.tm_isdst = -1;
dateTm.tm_sec = 0;
dateTm.tm_min = 0;
diff --git a/util/draft/date.h b/util/draft/date.h
index e3eb616fe5..97b3b7f688 100644
--- a/util/draft/date.h
+++ b/util/draft/date.h
@@ -110,20 +110,20 @@ inline bool operator==(const TDate& left, const TDate& right) {
}
inline int operator-(const TDate& left, const TDate& right) {
- if (left < right) {
- return -(right - left);
- }
+ if (left < right) {
+ return -(right - left);
+ }
return static_cast<int>((left.Timestamp + SECONDS_IN_DAY / 2 - right.Timestamp) / SECONDS_IN_DAY);
-}
-
+}
+
inline IInputStream& operator>>(IInputStream& left, TDate& right) {
TString stroka;
- left >> stroka;
- TDate date(stroka.c_str());
- right = date;
- return left;
-}
-
+ left >> stroka;
+ TDate date(stroka.c_str());
+ right = date;
+ return left;
+}
+
inline IOutputStream& operator<<(IOutputStream& left, const TDate& right) {
return left << right.ToStroka();
}