| 1055 | } |
| 1056 | |
| 1057 | void 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 |
no test coverage detected