date: trivial fix - was reading seconds into nanoseconds field! DOH
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -210,7 +210,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
#if ENABLE_FEATURE_DATE_NANO
|
#if ENABLE_FEATURE_DATE_NANO
|
||||||
clock_gettime(CLOCK_REALTIME, &ts);
|
clock_gettime(CLOCK_REALTIME, &ts);
|
||||||
#else
|
#else
|
||||||
time(&ts.tv_nsec);
|
time(&ts.tv_sec);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
localtime_r(&ts.tv_sec, &tm_time);
|
localtime_r(&ts.tv_sec, &tm_time);
|
||||||
|
Reference in New Issue
Block a user