fix:时区转换问题

This commit is contained in:
2024-10-26 21:28:26 +08:00
parent d479d39352
commit 616cd54222
7 changed files with 81 additions and 44 deletions
+3
View File
@@ -209,11 +209,14 @@ func Phase(date time.Time) float64 {
}
// ShuoYue 朔月
// 返回Date对应UTC世界时的月相大小
func ShuoYue(year float64) time.Time {
jde := basic.TD2UT(basic.CalcMoonSH(year, 0), false)
return basic.JDE2DateByZone(jde, time.UTC, false)
}
// NextShuoYue 下次朔月时间
// 返回date之后的下一个朔月时间(UTC时间)
func NextShuoYue(date time.Time) time.Time {
return nextMoonPhase(date, 0)
}