date: trivial fix - was reading seconds into nanoseconds field! DOH

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2010-06-12 03:32:22 +02:00
parent 53e2f38b69
commit e2b41cfb4b

View File

@ -210,7 +210,7 @@ int date_main(int argc UNUSED_PARAM, char **argv)
#if ENABLE_FEATURE_DATE_NANO
clock_gettime(CLOCK_REALTIME, &ts);
#else
time(&ts.tv_nsec);
time(&ts.tv_sec);
#endif
}
localtime_r(&ts.tv_sec, &tm_time);