From 209d54e8b5be6476d896cee1a5274bd2b46219e2 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 24 Mar 2021 07:39:11 -0700 Subject: [PATCH] add hour_24 to schema docs --- docs/parsers/date.md | 5 +++-- jc/parsers/date.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/parsers/date.md b/docs/parsers/date.md index 51af77c7..4503f3fb 100644 --- a/docs/parsers/date.md +++ b/docs/parsers/date.md @@ -2,7 +2,7 @@ # jc.parsers.date jc - JSON CLI output utility `date` command output parser -The `epoch` calculated timestamp field is naive (i.e. based on the local time of the system the parser is run on) +The `epoch` calculated timestamp field is naive. (i.e. based on the local time of the system the parser is run on) The `epoch_utc` calculated timestamp field is timezone-aware and is only available if the timezone field is UTC. @@ -82,7 +82,8 @@ Returns: "year": integer, "month_num": integer, "day": integer, - "hour": integer, + "hour": integer, # originally parsed hour + "hour_24": integer, # parsed hour converted to 24-hour value "minute": integer, "second": integer, "period": string, # 'AM' or 'PM'. null if 24-hour output diff --git a/jc/parsers/date.py b/jc/parsers/date.py index 0de76121..b43d7115 100644 --- a/jc/parsers/date.py +++ b/jc/parsers/date.py @@ -1,6 +1,6 @@ """jc - JSON CLI output utility `date` command output parser -The `epoch` calculated timestamp field is naive (i.e. based on the local time of the system the parser is run on) +The `epoch` calculated timestamp field is naive. (i.e. based on the local time of the system the parser is run on) The `epoch_utc` calculated timestamp field is timezone-aware and is only available if the timezone field is UTC. @@ -88,7 +88,8 @@ def process(proc_data): "year": integer, "month_num": integer, "day": integer, - "hour": integer, + "hour": integer, # originally parsed hour + "hour_24": integer, # parsed hour converted to 24-hour value "minute": integer, "second": integer, "period": string, # 'AM' or 'PM'. null if 24-hour output