diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-05-05 22:52:17 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-05 22:52:17 -0700 |
commit | 8146f19762c8fd67f6df3da4ba87a4e5ea880909 (patch) | |
tree | 4c870d39697d7155ef2d2e2c3c87afc76de77e6c /date.c | |
parent | ae616de6d53ef14ba11d2aa32f366086c1435dfa (diff) | |
parent | 54e0e6edfa60f84b582112804365e207e70f44a6 (diff) | |
download | git-8146f19762c8fd67f6df3da4ba87a4e5ea880909.tar.gz |
Merge branch 'maint'
* maint:
improve error message in config.c
t4018-diff-funcname: add cpp xfuncname pattern to syntax test
Work around BSD whose typeof(tv.tv_sec) != time_t
git-am.txt: reword extra headers in message body
git-am.txt: Use date or value instead of time or timestamp
git-am.txt: add an 'a', say what 'it' is, simplify a sentence
dir.c: Fix two minor grammatical errors in comments
git-svn: fix a sloppy Getopt::Long usage
Diffstat (limited to 'date.c')
-rw-r--r-- | date.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -871,13 +871,15 @@ unsigned long approxidate(const char *date) int number = 0; struct tm tm, now; struct timeval tv; + time_t time_sec; char buffer[50]; if (parse_date(date, buffer, sizeof(buffer)) > 0) return strtoul(buffer, NULL, 10); gettimeofday(&tv, NULL); - localtime_r(&tv.tv_sec, &tm); + time_sec = tv.tv_sec; + localtime_r(&time_sec, &tm); now = tm; for (;;) { unsigned char c = *date; |