summaryrefslogtreecommitdiff
path: root/date.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-01-24 13:12:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-24 20:35:44 (GMT)
commit3d42034a18297bc014e2132121c4854f5a07fe4c (patch)
treef31607df181152d666d13bfb4100186b8e7fc70b /date.c
parentacbf33f8462bb96d18168da85df8ba9ba01015d6 (diff)
downloadgit-3d42034a18297bc014e2132121c4854f5a07fe4c.zip
git-3d42034a18297bc014e2132121c4854f5a07fe4c.tar.gz
git-3d42034a18297bc014e2132121c4854f5a07fe4c.tar.bz2
show_date_relative(): drop unused "tz" parameter
The timestamp we receive is in epoch time, so there's no need for a timezone parameter to interpret it. The matching show_date() uses "tz" to show dates in author local time, but relative dates show only the absolute time difference. The author's location is irrelevant, barring relativistic effects from using Git close to the speed of light. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'date.c')
-rw-r--r--date.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/date.c b/date.c
index 9bc15df..61449f8 100644
--- a/date.c
+++ b/date.c
@@ -107,9 +107,9 @@ static int local_tzoffset(timestamp_t time)
return offset * eastwest;
}
-void show_date_relative(timestamp_t time, int tz,
- const struct timeval *now,
- struct strbuf *timebuf)
+void show_date_relative(timestamp_t time,
+ const struct timeval *now,
+ struct strbuf *timebuf)
{
timestamp_t diff;
if (now->tv_sec < time) {
@@ -216,7 +216,7 @@ const char *show_date(timestamp_t time, int tz, const struct date_mode *mode)
strbuf_reset(&timebuf);
gettimeofday(&now, NULL);
- show_date_relative(time, tz, &now, &timebuf);
+ show_date_relative(time, &now, &timebuf);
return timebuf.buf;
}