diff options
author | Ulf Hermann <[email protected]> | 2019-01-09 13:57:31 +0100 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2019-01-09 13:57:31 +0100 |
commit | bc774f62436c4fe5082f0a70c6620fa0fdf823a9 (patch) | |
tree | 07963f45b2cdaccf12281712e2eef179dbce1fee /src/ar.c | |
parent | 5da108a40dd24c7d3e4183ec9ae1904bb3f01575 (diff) | |
parent | 4ea9a2db164caadf836a65d5cdffb09a2d5a37ce (diff) |
Merge tag 'elfutils-0.175'
elfutils 0.175 release
Change-Id: I409f41767af349d0521351dd733879ad31c65aab
Diffstat (limited to 'src/ar.c')
-rw-r--r-- | src/ar.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -519,8 +519,14 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc, else if (oper == oper_list) { char datestr[100]; - strftime (datestr, sizeof (datestr), "%b %d %H:%M %Y", - localtime (&arhdr->ar_date)); + struct tm *tp = localtime (&arhdr->ar_date); + if (tp == NULL) + { + time_t time = 0; + tp = localtime (&time); + } + + strftime (datestr, sizeof (datestr), "%b %d %H:%M %Y", tp); printf ("%c%c%c%c%c%c%c%c%c %u/%u %6ju %s %s\n", (arhdr->ar_mode & S_IRUSR) ? 'r' : '-', |