diff options
author | gimych <gimych@yandex-team.ru> | 2022-02-10 16:51:59 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:51:59 +0300 |
commit | d38a76c277aac50b05eadee93aec4a6effb12e91 (patch) | |
tree | ab7fbbf3253d4c0e2793218f09378908beb025fb | |
parent | 9d2d0f8e0177a060b2a2142528c3eb94769c4893 (diff) | |
download | ydb-d38a76c277aac50b05eadee93aec4a6effb12e91.tar.gz |
Restoring authorship annotation for <gimych@yandex-team.ru>. Commit 2 of 2.
-rw-r--r-- | util/draft/date.cpp | 10 | ||||
-rw-r--r-- | util/draft/date.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/util/draft/date.cpp b/util/draft/date.cpp index b6242ab2fb..a290c46050 100644 --- a/util/draft/date.cpp +++ b/util/draft/date.cpp @@ -8,9 +8,9 @@ time_t GetDateStart(time_t ts) { tm dateTm; memset(&dateTm, 0, sizeof(tm)); localtime_r(&ts, &dateTm); - + dateTm.tm_isdst = -1; - + dateTm.tm_sec = 0; dateTm.tm_min = 0; dateTm.tm_hour = 0; @@ -23,7 +23,7 @@ static time_t ParseDate(const char* date, const char* format) { if (!strptime(date, format, &dateTm)) { ythrow yexception() << "Invalid date string and format: " << date << ", " << format; } - return mktime(&dateTm); + return mktime(&dateTm); } static time_t ParseDate(const char* dateStr) { @@ -49,8 +49,8 @@ TDate::TDate(const TString& yyyymmdd) { } -TDate::TDate(time_t ts) - : Timestamp(GetDateStart(ts)) +TDate::TDate(time_t ts) + : Timestamp(GetDateStart(ts)) { } diff --git a/util/draft/date.h b/util/draft/date.h index df0c5e8a4f..e3eb616fe5 100644 --- a/util/draft/date.h +++ b/util/draft/date.h @@ -9,8 +9,8 @@ // XXX: uses system calls for trivial things. may be very slow therefore. -time_t GetDateStart(time_t ts); - +time_t GetDateStart(time_t ts); + // Local date (without time zone) class TDate { // XXX: wrong: must store number of days since epoch |