diff options
Diffstat (limited to 'libntp/humandate.c')
-rw-r--r-- | libntp/humandate.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libntp/humandate.c b/libntp/humandate.c index 52f5af1661a9e..630c8713347ee 100644 --- a/libntp/humandate.c +++ b/libntp/humandate.c @@ -22,10 +22,8 @@ humandate( { char *bp; struct tm *tm; - time_t sec; - sec = ntptime - JAN_1970; - tm = localtime(&sec); + tm = ntp2unix_tm(ntptime, 1); if (!tm) return "--- --- -- ---- --:--:--"; @@ -48,8 +46,9 @@ humanlogtime(void) { char *bp; time_t cursec = time((time_t *) 0); - struct tm *tm = localtime(&cursec); + struct tm *tm; + tm = localtime(&cursec); if (!tm) return "-- --- --:--:--"; |