From 4d673c9ad4c65c329a85ebb19c2812ae93183099 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 28 Jun 2018 16:57:21 -0700 Subject: diff: add timestamps to the ---/+++ lines and --color. (My apologies for mixing these two unrelated changes up.) --- toys/other/stat.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'toys/other') diff --git a/toys/other/stat.c b/toys/other/stat.c index f68704dd..a1233650 100644 --- a/toys/other/stat.c +++ b/toys/other/stat.c @@ -67,11 +67,7 @@ static void strout(char *val) static void date_stat_format(struct timespec *ts) { - char *s = toybuf+128; - strftime(s, sizeof(toybuf)-128, "%Y-%m-%d %H:%M:%S", - localtime(&(ts->tv_sec))); - sprintf(s+strlen(s), ".%09ld", ts->tv_nsec); - strout(s); + strout(format_iso_time(toybuf+128, sizeof(toybuf)-128, ts)); } static void print_stat(char type) -- cgit v1.2.3