1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-21 00:19:42 +02:00

add hour_24 to schema docs

This commit is contained in:
Kelly Brazil
2021-03-24 07:39:11 -07:00
parent 2b38462de7
commit 209d54e8b5
2 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
# jc.parsers.date # jc.parsers.date
jc - JSON CLI output utility `date` command output parser 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. 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, "year": integer,
"month_num": integer, "month_num": integer,
"day": integer, "day": integer,
"hour": integer, "hour": integer, # originally parsed hour
"hour_24": integer, # parsed hour converted to 24-hour value
"minute": integer, "minute": integer,
"second": integer, "second": integer,
"period": string, # 'AM' or 'PM'. null if 24-hour output "period": string, # 'AM' or 'PM'. null if 24-hour output

View File

@ -1,6 +1,6 @@
"""jc - JSON CLI output utility `date` command output parser """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. 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, "year": integer,
"month_num": integer, "month_num": integer,
"day": integer, "day": integer,
"hour": integer, "hour": integer, # originally parsed hour
"hour_24": integer, # parsed hour converted to 24-hour value
"minute": integer, "minute": integer,
"second": integer, "second": integer,
"period": string, # 'AM' or 'PM'. null if 24-hour output "period": string, # 'AM' or 'PM'. null if 24-hour output