MCPcopy Create free account
hub / github.com/chen3feng/toft / FormatHttpTime

Function FormatHttpTime

net/http/time.cpp:52–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52size_t FormatHttpTime(time_t time, char* str, size_t str_length)
53{
54 locale_t c_locale = GetCLocale();
55 struct tm tm = {};
56 gmtime_r(&time, &tm);
57 return strftime_l(str, str_length, "%a, %d %b %Y %H:%M:%S %Z", &tm, c_locale);
58}
59
60bool FormatHttpTime(time_t time, std::string* str)
61{

Callers 1

TESTFunction · 0.85

Calls 2

GetCLocaleFunction · 0.85
assignMethod · 0.80

Tested by 1

TESTFunction · 0.68