Skip to content

Commit 547ed71

Browse files
peffgitster
authored andcommitted
fast-import: switch crash-report date to iso8601
When fast-import emits a crash report, it does so in the user's local timezone. But because we omit the timezone completely for DATE_LOCAL, a reader of the report does not immediately know which time zone was used. Let's switch this to ISO8601 instead, which includes the time zone. This does mean we will show the time in UTC, but that's not a big deal. A crash report like this will either be looked at immediately (in which case nobody even looks at the timestamp), or it will be passed along to a developer to debug, in which case the original timezone is less likely to be of interest. Signed-off-by: Jeff King <[email protected]> Signed-off-by: John Keeping <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4b1c5e1 commit 547ed71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fast-import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static void write_crash_report(const char *err)
421421
fprintf(rpt, "fast-import crash report:\n");
422422
fprintf(rpt, " fast-import process: %"PRIuMAX"\n", (uintmax_t) getpid());
423423
fprintf(rpt, " parent process : %"PRIuMAX"\n", (uintmax_t) getppid());
424-
fprintf(rpt, " at %s\n", show_date(time(NULL), 0, DATE_MODE(LOCAL)));
424+
fprintf(rpt, " at %s\n", show_date(time(NULL), 0, DATE_MODE(ISO8601)));
425425
fputc('\n', rpt);
426426

427427
fputs("fatal: ", rpt);

0 commit comments

Comments
 (0)