diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-03-26 11:51:21 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-03-26 11:51:21 +0100 |
commit | fe78c9a8b727b0145fa93505cca621fe7962b9e9 (patch) | |
tree | c33c2d69434a264f944289868d6b7527e091f582 | |
parent | 973698d7b119114c4d5621f0f811efc04f4bc6d9 (diff) | |
download | busybox-w32-fe78c9a8b727b0145fa93505cca621fe7962b9e9.tar.gz busybox-w32-fe78c9a8b727b0145fa93505cca621fe7962b9e9.tar.bz2 busybox-w32-fe78c9a8b727b0145fa93505cca621fe7962b9e9.zip |
ts: do call localtime() when neither -s nor -i specified
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/ts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/miscutils/ts.c b/miscutils/ts.c index 4e1c7739f..f2d367654 100644 --- a/miscutils/ts.c +++ b/miscutils/ts.c | |||
@@ -69,8 +69,8 @@ int ts_main(int argc UNUSED_PARAM, char **argv) | |||
69 | } | 69 | } |
70 | if (opt & 1) /* -i */ | 70 | if (opt & 1) /* -i */ |
71 | base = ts1; | 71 | base = ts1; |
72 | localtime_r(&ts.tv_sec, &tm_time); | ||
73 | } | 72 | } |
73 | localtime_r(&ts.tv_sec, &tm_time); | ||
74 | strftime(date_buf, COMMON_BUFSIZE, fmt_dt2str, &tm_time); | 74 | strftime(date_buf, COMMON_BUFSIZE, fmt_dt2str, &tm_time); |
75 | if (!frac) { | 75 | if (!frac) { |
76 | printf("%s %s", date_buf, line); | 76 | printf("%s %s", date_buf, line); |