forked from osmocom/wireshark
epan: don't print nanoseconds if seconds isn't representable.
Fix for previous fixes to #17179.
This commit is contained in:
parent
bf265d7e7a
commit
4715f5021c
|
@ -1332,10 +1332,10 @@ ek_write_field_value(field_info *fi, write_json_data* pdata)
|
|||
#endif
|
||||
if (tm != NULL) {
|
||||
strftime(time_string, sizeof(time_string), "%FT%T", tm);
|
||||
json_dumper_value_anyf(pdata->dumper, "\"%s.%uZ\"", time_string, t->nsecs);
|
||||
} else {
|
||||
g_snprintf(time_string, sizeof(time_string), "Not representable");
|
||||
json_dumper_value_anyf(pdata->dumper, "\"Not representable\"");
|
||||
}
|
||||
json_dumper_value_anyf(pdata->dumper, "\"%s.%uZ\"", time_string, t->nsecs);
|
||||
break;
|
||||
default:
|
||||
dfilter_string = fvalue_to_string_repr(NULL, &fi->value, FTREPR_DISPLAY, fi->hfinfo->display);
|
||||
|
|
Loading…
Reference in New Issue