修复分时K线,时间不对的问题

This commit is contained in:
injoyai
2024-11-11 08:56:13 +08:00
parent 5ff96b9d4a
commit 420a83dbc2
3 changed files with 31 additions and 5 deletions

View File

@@ -101,7 +101,7 @@ func GetTime(bs [4]byte, Type uint8) time.Time {
case TypeKlineDay2, TypeKlineMinute, TypeKlineMinute2:
yearMonthDay := Uint16(bs[:2])
hourMinute := Uint16(bs[:2])
hourMinute := Uint16(bs[2:4])
year := int(yearMonthDay>>11 + 2004)
month := yearMonthDay % 2048 / 100
day := int((yearMonthDay % 2048) % 100)