bug fixed

This commit is contained in:
2020-12-31 10:08:00 +08:00
parent 681dea1fb5
commit e1fcc56178
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -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)
}
+1 -4
View File
@@ -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)