aboutsummaryrefslogtreecommitdiffstats
path: root/util/draft/datetime.h
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /util/draft/datetime.h
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'util/draft/datetime.h')
-rw-r--r--util/draft/datetime.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/draft/datetime.h b/util/draft/datetime.h
index 8a387ea6f1..5bf0ee7156 100644
--- a/util/draft/datetime.h
+++ b/util/draft/datetime.h
@@ -1,7 +1,7 @@
#pragma once
#include <util/generic/algorithm.h>
-#include <util/generic/string.h>
+#include <util/generic/string.h>
#include <util/generic/yexception.h>
#include <util/generic/ymath.h>
#include <util/datetime/base.h>
@@ -70,7 +70,7 @@ namespace NDatetime {
// keeps the object consistent
TSimpleTM& Add(EField f, i32 amount = 1);
- TString ToString(const char* fmt = "%a, %d %b %Y %H:%M:%S %z") const;
+ TString ToString(const char* fmt = "%a, %d %b %Y %H:%M:%S %z") const;
TSimpleTM& ToUTC() {
return *this = New(AsTimeT());
@@ -133,16 +133,16 @@ namespace NDatetime {
};
}
-inline TString date2str(const time_t date) {
+inline TString date2str(const time_t date) {
struct tm dateTm;
memset(&dateTm, 0, sizeof(dateTm));
localtime_r(&date, &dateTm);
char buf[9];
strftime(buf, sizeof(buf), "%Y%m%d", &dateTm);
- return TString(buf);
+ return TString(buf);
}
-inline time_t str2date(const TString& dateStr) {
+inline time_t str2date(const TString& dateStr) {
struct tm dateTm;
memset(&dateTm, 0, sizeof(tm));
strptime(dateStr.data(), "%Y%m%d", &dateTm);