diff options
author | luchko <luchko@yandex-team.ru> | 2022-02-10 16:48:21 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:21 +0300 |
commit | 6400e9461eb46fbf792bb457abea992f9bb135c1 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/http/misc | |
parent | 9f21dcc5d3d7c6e54e7adbaa2abaa6d86ae08c59 (diff) | |
download | ydb-6400e9461eb46fbf792bb457abea992f9bb135c1.tar.gz |
Restoring authorship annotation for <luchko@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/http/misc')
-rw-r--r-- | library/cpp/http/misc/httpdate.cpp | 4 | ||||
-rw-r--r-- | library/cpp/http/misc/httpdate.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/library/cpp/http/misc/httpdate.cpp b/library/cpp/http/misc/httpdate.cpp index 04c1727adf..4a3031bbf4 100644 --- a/library/cpp/http/misc/httpdate.cpp +++ b/library/cpp/http/misc/httpdate.cpp @@ -54,11 +54,11 @@ int format_http_date(char buf[], size_t size, time_t when) { GmTimeR(&when, &tms); #ifndef HTTP_DATE_ISO_8601 - return snprintf(buf, size, "%s, %02d %s %04d %02d:%02d:%02d GMT", + return snprintf(buf, size, "%s, %02d %s %04d %02d:%02d:%02d GMT", wkdays[tms.tm_wday], tms.tm_mday, months[tms.tm_mon], tms.tm_year + 1900, tms.tm_hour, tms.tm_min, tms.tm_sec); #else /* ISO 8601 */ - return snprintf(buf, size, "%04d%02d%02dT%02d%02d%02d+0000", + return snprintf(buf, size, "%04d%02d%02dT%02d%02d%02d+0000", tms.tm_year + 1900, tms.tm_mon + 1, tms.tm_mday, tms.tm_hour, tms.tm_min, tms.tm_sec); #endif diff --git a/library/cpp/http/misc/httpdate.h b/library/cpp/http/misc/httpdate.h index 20915151bf..04876f38fe 100644 --- a/library/cpp/http/misc/httpdate.h +++ b/library/cpp/http/misc/httpdate.h @@ -15,7 +15,7 @@ inline time_t parse_http_date(const TStringBuf& datestring) { } } -int format_http_date(char buf[], size_t size, time_t when); +int format_http_date(char buf[], size_t size, time_t when); char* format_http_date(time_t when, char* buf, size_t len); TString FormatHttpDate(time_t when); |