FreeBSD/contrib/ntp/libntp/ntp_calendar.c
/*
 *---------------------------------------------------------------------
 * Take a UN*X time and convert to a calendar structure.
 *---------------------------------------------------------------------
 */
Take a UN*X time and convert to a calendar structure.
Take a UN * X time and convert to a calendar structure .
int
ntpcal_time_to_date(
	struct calendar	*jd,
	const vint64	*ts
	)
{
	ntpcal_split ds;
	ds = ntpcal_daysplit(ts);
	ds.hi += ntpcal_daysec_to_date(jd, ds.lo);
	ds.hi += DAY_UNIX_STARTS;
	return ntpcal_rd_to_date(jd, ds.hi);
}
int ntpcal_time_to_date ( struct calendar * jd , const vint64 * ts ) { ntpcal_split ds ; ds = ntpcal_daysplit ( ts ) ; ds . hi += ntpcal_daysec_to_date ( jd , ds . lo ) ; ds . hi += DAY_UNIX_STARTS ; return ntpcal_rd_to_date ( jd , ds . hi ) ; }
Take a UN*X time and convert to a calendar structure.
Take a UN * X time and convert to a calendar structure .