MCPcopy Create free account
hub / github.com/git/git / datestamp

Function datestamp

date.c:1057–1069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057void datestamp(struct strbuf *out)
1058{
1059 time_t now;
1060 int offset;
1061 struct tm tm = { 0 };
1062
1063 time(&now);
1064
1065 offset = tm_to_time_t(localtime_r(&now, &tm)) - now;
1066 offset /= 60;
1067
1068 date_string(now, offset, out);
1069}
1070
1071/*
1072 * Relative time update (eg "2 days ago"). If we haven't set the time

Callers 3

ident_default_dateFunction · 0.85
generate_push_certFunction · 0.85
parse_identFunction · 0.85

Calls 3

tm_to_time_tFunction · 0.85
localtime_rFunction · 0.85
date_stringFunction · 0.85

Tested by

no test coverage detected