[time-fmt] add a time format

This commit is contained in:
Timothy Stack 2021-07-13 10:40:24 -07:00
parent 5f1dbac193
commit 65a7bd7bd6
3 changed files with 10 additions and 0 deletions

View File

@ -42,6 +42,7 @@ TIME_FORMATS = \
"%m/%e/%Y %l:%M:%S %p" \
"%d/%b/%y %H:%M:%S" \
"%m%d %H:%M:%S" \
"%Y%m%d.%H%M%S" \
"%H:%M:%S" \
"%M:%S" \
"%m/%d %H:%M:%S" \

2
test/logfile_generic.3 Normal file
View File

@ -0,0 +1,2 @@
20120702.102240,672:DEBUG:foo bar baz
20141008.165638,344:WARN:foo bar baz

View File

@ -444,6 +444,13 @@ Jul 02 10:22:40 2012 -- 672
Oct 08 16:56:38 2014 -- 344
EOF
run_test ./drive_logfile -t -f generic_log ${srcdir}/logfile_generic.3
check_output "generic_log timestamp interpreted incorrectly?" <<EOF
Jul 02 10:22:40 2012 -- 672
Oct 08 16:56:38 2014 -- 344
EOF
run_test ./drive_logfile -v -f generic_log ${srcdir}/logfile_generic.0
check_output "generic_log level interpreted incorrectly?" <<EOF