Wireshark-dev: Re: [Wireshark-dev] proto_item_get_display_repr ignoring time zone

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Thu, 23 Jul 2020 20:58:08 +0200
That smells like a bug to me.

> On 23 Jul 2020, at 18:33, Thomas Wiens <th.wiens@xxxxxx> wrote:
> 
> Hi,
> 
> I've noticed that when I add a timestamp in UTC time zone
> (ABSOLUTE_TIME_UTC) to the tree with proto_tree_add_time() it's displayd
> in UTC as expected. But when I get the string from this proto_item with
> proto_item_get_display_repr() then I get local time instead.
> 
> I've digged a little bit into this and found in ftype-time.c:
> 
> absolute_val_to_repr(fvalue_t *fv, ftrepr_t rtype, int field_display
> _U_, char *buf, unsigned int size)
> 
> that field_display is not used (which would contain ABSOLUTE_TIME_UCT).
> Instead it's set to ABSOLUTE_TIME_LOCAL, same in absolute_val_repr_len().
> 
> Is there a good reason for this or a bug?
> 
> --
> Cheers,
> 
> Thomas Wiens