diff options
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/epan/proto.c b/epan/proto.c index 6256435af8..53c3ce4d46 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -3334,7 +3334,9 @@ proto_custom_set(proto_tree* tree, int field_id, break; case FT_ABSOLUTE_TIME: - g_strlcpy(result, abs_time_to_str(fvalue_get(&finfo->value), FALSE), size); + g_strlcpy(result, + abs_time_to_str(fvalue_get(&finfo->value), (hfinfo->display == ABSOLUTE_TIME_UTC)), + size); break; case FT_RELATIVE_TIME: @@ -4224,6 +4226,13 @@ static void tmp_fld_check_assert(header_field_info *hfinfo) { case FT_BOOLEAN: break; + case FT_ABSOLUTE_TIME: + DISSECTOR_ASSERT(hfinfo->display == ABSOLUTE_TIME_LOCAL || + hfinfo->display == ABSOLUTE_TIME_UTC); + DISSECTOR_ASSERT(hfinfo->bitmask == 0); + DISSECTOR_ASSERT(hfinfo->strings == NULL); + break; + default: DISSECTOR_ASSERT(hfinfo->display == BASE_NONE); DISSECTOR_ASSERT(hfinfo->bitmask == 0); @@ -4461,7 +4470,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str) case FT_ABSOLUTE_TIME: g_snprintf(label_str, ITEM_LABEL_LENGTH, "%s: %s", hfinfo->name, - abs_time_to_str(fvalue_get(&fi->value), FALSE)); + abs_time_to_str(fvalue_get(&fi->value), (hfinfo->display == ABSOLUTE_TIME_UTC))); break; case FT_RELATIVE_TIME: @@ -6534,4 +6543,3 @@ proto_check_field_name(const gchar *field_name) { return wrs_check_charset(fld_abbrev_chars, field_name); } - |