aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/bowdst.py11
-rw-r--r--python/custodian_wire.py2
2 files changed, 11 insertions, 2 deletions
diff --git a/python/bowdst.py b/python/bowdst.py
index 6f3780ca..c532c2f1 100644
--- a/python/bowdst.py
+++ b/python/bowdst.py
@@ -34,8 +34,17 @@ def download_messages(em):
date_part, "%d %b %Y"
).date()
case "BowdstWires":
+ try:
+ date = datetime.datetime.strptime(
+ date_part, "%Y%m%d%H%M%S"
+ ).date()
+ except ValueError:
+ date = datetime.datetime.strptime(
+ date_part, "%d %b %Y%H%M%S"
+ ).date()
+ case "Live-cash":
date = datetime.datetime.strptime(
- date_part, "%d %b %Y%H%M%S"
+ date_part, "%Y%m%d%H%M%S"
).date()
case _:
warnings.warn(f"Unknown report type {file_type}")
diff --git a/python/custodian_wire.py b/python/custodian_wire.py
index 13970c8d..7c246696 100644
--- a/python/custodian_wire.py
+++ b/python/custodian_wire.py
@@ -7,7 +7,7 @@ import datetime
def dt_from_fname(f):
return datetime.datetime.strptime(
- f.name.split("_")[1].split(".")[0], "%d %b %Y%H%M%S"
+ f.name.split("_")[1].split(".")[0], "%Y%m%d%H%M%S"
)