From bc2549d5880c270d790819aade2db9c299c0d4cb Mon Sep 17 00:00:00 2001 From: Kent Inverarity Date: Thu, 30 Nov 2023 11:08:15 +1030 Subject: [PATCH] Fix #1 - remove strange < 12 and < 12 logic This results in datefmt="auto" only force-changing the date format when we know for a fact it is wrong i.e. month > 12 --- korexo_profile/korexo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/korexo_profile/korexo.py b/korexo_profile/korexo.py index 6a537c9..a03c43c 100644 --- a/korexo_profile/korexo.py +++ b/korexo_profile/korexo.py @@ -157,9 +157,9 @@ def _read_korexo_format(fn, encoding, parse_dts=True, datefmt="auto"): datefmt = "%d/%m/%Y" elif unitfmt == "DD/MM/YYYY" and int(second) > 12: datefmt = "%m/%d/%Y" - elif int(first) <= 12 and int(second) <= 12: - if unitfmt == "MM/DD/YYYY" and second.startswith("0"): - datefmt = "%d/%m/%Y" + # elif int(first) <= 12 and int(second) <= 12: + # if unitfmt == "MM/DD/YYYY" and second.startswith("0"): + # datefmt = "%d/%m/%Y" else: pass try: