Skip to content

Commit

Permalink
update _fix_date of instrument
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuizi7 committed Dec 17, 2018
1 parent 658517f commit ebf7377
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rqalpha/model/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Instrument(object):

@staticmethod
def _fix_date(ds, dflt):
if isinstance(ds, datetime.datetime):
return ds
if ds == '0000-00-00':
return dflt
year, month, day = ds.split('-')
Expand Down

0 comments on commit ebf7377

Please sign in to comment.