Skip to content

Commit

Permalink
!12 fix bug: 通达信lc5导入mysql时候文件数据解析的时间计算错误导致导入不了数据
Browse files Browse the repository at this point in the history
Merge pull request !12 from Jet/fix-strategy
  • Loading branch information
fasiondog authored and gitee-org committed Mar 12, 2024
2 parents 40d53ee + e92ed83 commit bcf0285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hikyuu/data/tdx_to_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def trans_date(yymm, hhmm):
def get_date(pos):
src_file.seek(pos * 32, SEEK_SET)
data = src_file.read(4)
a = struct.unpack('hh', data)
a = struct.unpack('HH', data)
return trans_date(a[0], a[1])
def find_pos():
Expand Down Expand Up @@ -297,7 +297,7 @@ def find_pos():
data = src_file.read(32)
while data:
record = struct.unpack('hhfffffii', data)
record = struct.unpack('HHfffffii', data)
if record[3] >= record[2] >= record[4] > 0\
and record[3] >= record[5] >= record[4] >0\
and record[5] >=0 \
Expand Down

0 comments on commit bcf0285

Please sign in to comment.