← Commit list

fe78c9a8b

Denys Vlasenko
Denys Vlasenko
2019-03-26
SUCCESS Duration: 149s

Subject

ts: do call localtime() when neither -s nor -i specified

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/ts.c+1 -1
@@ -69,8 +69,8 @@ int ts_main(int argc UNUSED_PARAM, char **argv)
}
if (opt & 1) /* -i */
base = ts1;
- localtime_r(&ts.tv_sec, &tm_time);
}
+ localtime_r(&ts.tv_sec, &tm_time);
strftime(date_buf, COMMON_BUFSIZE, fmt_dt2str, &tm_time);
if (!frac) {
printf("%s %s", date_buf, line);