1
1
mirror of https://github.com/tstack/lnav.git synced 2024-09-11 13:05:51 +03:00

[lss] use adjusted time

Related to #967
This commit is contained in:
Timothy Stack 2022-04-06 12:23:07 -07:00
parent 1019714409
commit c125211a7e
2 changed files with 3 additions and 7 deletions

View File

@ -251,11 +251,7 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
|| !(format->lf_timestamp_flags & ETF_DAY_SET)
|| !(format->lf_timestamp_flags & ETF_MONTH_SET))
{
format->lf_date_time.convert_to_timeval(
&this->lss_token_value.c_str()[time_range.lr_start],
time_range.length(),
format->get_timestamp_formats(),
adjusted_time);
adjusted_time = this->lss_token_line->get_timeval();
fmt = "%Y-%m-%d %H:%M:%S.%f";
gmtime_r(&adjusted_time.tv_sec, &adjusted_tm.et_tm);
adjusted_tm.et_nsec

View File

@ -328,8 +328,8 @@ EOF
run_test ${lnav_test} -n ${srcdir}/logfile_tcf.1
check_output "timestamps with no dates are not rewritten?" <<EOF
TCF 2014-04-06 11:59:47.191000: Server-Properties: {"Name":"TCF Protocol Logger","OSName":"Linux 3.2.0-60-generic","UserName":"xavier","AgentID":"1fde3dd1-d4be-4f79-8090-6f8d212f03bf","TransportName":"TCP","Proxy":"","ValueAdd":"1","Port":"1534"}
TCF 2014-04-06 11:30:11.474000: 0: ---> C 2 RunControl getChildren null <eom>
TCF 2014-04-06 09:59:47.191000: Server-Properties: {"Name":"TCF Protocol Logger","OSName":"Linux 3.2.0-60-generic","UserName":"xavier","AgentID":"1fde3dd1-d4be-4f79-8090-6f8d212f03bf","TransportName":"TCP","Proxy":"","ValueAdd":"1","Port":"1534"}
TCF 2014-04-06 10:30:11.474000: 0: ---> C 2 RunControl getChildren null <eom>
TCF 2014-04-06 11:01:11.475000: 0: <--- R 2 ["P1"] <eom>
EOF