From c8655565ff8718f0f14d41696b81e6539529dde1 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Thu, 1 Apr 2021 11:23:24 -0700 Subject: [PATCH] use new timestamp class --- jc/parsers/ls.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jc/parsers/ls.py b/jc/parsers/ls.py index 7be38b15..f2fc66ad 100644 --- a/jc/parsers/ls.py +++ b/jc/parsers/ls.py @@ -210,8 +210,9 @@ def process(proc_data): if 'date' in entry: # to speed up processing only try to convert the date if it's not the default format if not re.match(r'[a-zA-Z]{3}\s{1,2}\d{1,2}\s{1,2}[0-9:]{4,5}', entry['date']): - entry['epoch'] = jc.utils.parse_datetime_to_timestamp(entry['date'])['timestamp_naive'] - entry['epoch_utc'] = jc.utils.parse_datetime_to_timestamp(entry['date'])['timestamp_utc'] + ts = jc.utils.timestamp(entry['date']) + entry['epoch'] = ts.naive + entry['epoch_utc'] = ts.utc return proc_data