Преглед изворни кода

Minor bug with date object

Foppe Hemminga пре 6 година
родитељ
комит
66f5845e4e
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -71,7 +71,7 @@ if __name__ == '__main__':
                     found_in_database = True
                     found_in_database = True
             if not found_in_database:
             if not found_in_database:
                 # report new scratching
                 # report new scratching
-                date_object = datetime.datetime.strptime(scratching.date, "%Y%m%d").date()
+                date_object = datetime.datetime.strptime(scratching.date, "%Y-%m-%d").date()
                 day_abbr = date_object.strftime('%a')
                 day_abbr = date_object.strftime('%a')
                 message = 'New scratching: venue = {} {} {}-{} | race = {} | horse = {}'.format(day_abbr,
                 message = 'New scratching: venue = {} {} {}-{} | race = {} | horse = {}'.format(day_abbr,
                                                                                                 scratching.date,
                                                                                                 scratching.date,