bug fixed

master
兔子 4 years ago
parent 681dea1fb5
commit e1fcc56178

@ -55,7 +55,7 @@ func ChineseLunar(date time.Time) (int, int, bool, string) {
// 例计算己亥猪年腊月三十日对应的公历即2020年1月24日
// 由于农历还未到鼠年故应当传入Solar(2019,12,30,false)
func Solar(year, month, day int, leap bool) time.Time {
jde := basic.GetSolar(year, month, day, leap) - 8.0/24.0
jde := basic.GetSolar(year, month, day, leap)
zone := time.FixedZone("CST", 8*3600)
return basic.JDE2DateByZone(jde, zone)
}

@ -89,7 +89,7 @@ func Azimuth(date time.Time, lon, lat float64) float64 {
// date, 世界时(忽略此处时区)
// lon经度东正西负
// lat纬度北正南负
func Zenith(date time.Time, lon, lat, timezone float64) float64 {
func Zenith(date time.Time, lon, lat float64) float64 {
jde := basic.Date2JDE(date)
_, loc := date.Zone()
return basic.HMoonHeight(jde, lon, lat, float64(loc)/3600.0)
@ -99,7 +99,6 @@ func Zenith(date time.Time, lon, lat, timezone float64) float64 {
// date, 世界时(忽略此处时区)
// lon经度东正西负
// lat纬度北正南负
// timezone时区东正西负
func CulminationTime(date time.Time, lon, lat float64) float64 {
jde := basic.Date2JDE(date)
_, loc := date.Zone()
@ -110,7 +109,6 @@ func CulminationTime(date time.Time, lon, lat float64) float64 {
// date, 世界时(忽略此处时区)
// lon经度东正西负
// lat纬度北正南负
// timezone时区东正西负
func RiseTime(date time.Time, lon, lat float64, aero bool) (time.Time, error) {
var err error
jde := basic.Date2JDE(date)
@ -137,7 +135,6 @@ func RiseTime(date time.Time, lon, lat float64, aero bool) (time.Time, error) {
// date, 世界时(忽略此处时区)
// lon经度东正西负
// lat纬度北正南负
// timezone时区东正西负
func DownTime(date time.Time, lon, lat float64, aero bool) (time.Time, error) {
var err error
jde := basic.Date2JDE(date)

Loading…
Cancel
Save