internal/protocol/time.go
func julianDayToTime(jd int) time.Time {
	var f int

	if jd < gregorianDay {
		f = jd + 1401
	} else {
		f = jd + 1401 + (((4*jd+274277)/146097)*3)/4 - 38
	}

	e := 4*f + 3
	g := (e % 1461) / 4
	h := 5*g + 2
	day := (h%153)/5 + 1
	month := (h/153+2)%12 + 1
	year := (e / 1461) - 4716 + (12+2-month)/12

	return time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC)
}
func julianDayToTime(jd int) time.Time {
	var f int

	if jd < gregorianDay {
		f = jd + 1401
	} else {
		f = jd + 1401 + (((4*jd+274277)/146097)*3)/4 - 38
	}

	e := 4*f + 3
	g := (e % 1461) / 4
	h := 5*g + 2
	day := (h%153)/5 + 1
	month := (h/153+2)%12 + 1
	year := (e / 1461) - 4716 + (12+2-month)/12

	return time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC)
}
// JulianDayToTime returns the correcponding UTC date for a Julian Day Number.
// The algorithm is taken from https://en.wikipedia.org/wiki/Julian_day.