Sync usage with man page.
[netbsd-mini2440.git] / dist / ntp / libntp / calyearstart.c
blob721d02425f56996d014164fa6a14b49a800c5843
1 /* $NetBSD$ */
3 /*
4 * calyearstart - determine the NTP time at midnight of January 1 in
5 * the year of the given date.
6 */
7 #include <sys/types.h>
9 #include "ntp_types.h"
10 #include "ntp_calendar.h"
11 #include "ntp_stdlib.h"
13 u_long
14 calyearstart(u_long ntp_time)
16 struct calendar jt;
18 caljulian(ntp_time,&jt);
19 jt.yearday = 1;
20 jt.monthday = 1;
21 jt.month = 1;
22 jt.hour = jt.minute = jt.second = 0;
23 return caltontp(&jt);