aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftype-time.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-21 06:33:25 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-05-21 06:33:25 +0000
commitd72fe013b234035c97d805d17275ebb94ad3b40a (patch)
tree7017587d5ae078490ee9b3be8ec6551e7df71d13 /epan/ftypes/ftype-time.c
parent9a048113183d3546aef0bb163b818acaba539305 (diff)
Have abs_time_to_str() and abs_time_to_str_secs() take an additional
argument indicating whether to include the time zone in the string. If we're constructing a display filter, don't include the time zone, otherwise do. Fixes bug 4756. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32913 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/ftypes/ftype-time.c')
-rw-r--r--epan/ftypes/ftype-time.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c
index 75436cbb35..fd81266722 100644
--- a/epan/ftypes/ftype-time.c
+++ b/epan/ftypes/ftype-time.c
@@ -319,14 +319,17 @@ absolute_val_repr_len(fvalue_t *fv, ftrepr_t rtype _U_)
{
gchar *rep;
- rep = abs_time_to_str(&fv->value.time, ABSOLUTE_TIME_LOCAL);
+ rep = abs_time_to_str(&fv->value.time, ABSOLUTE_TIME_LOCAL,
+ rtype == FTREPR_DISPLAY);
return (int)strlen(rep) + 2; /* 2 for opening and closing quotes */
}
static void
absolute_val_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, char *buf)
{
- sprintf(buf, "\"%s\"", abs_time_to_str(&fv->value.time, ABSOLUTE_TIME_LOCAL));
+ sprintf(buf, "\"%s\"",
+ abs_time_to_str(&fv->value.time, ABSOLUTE_TIME_LOCAL,
+ rtype == FTREPR_DISPLAY));
}
static int