aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-diameter.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-03-02 20:16:18 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-03-02 20:16:18 +0000
commit7cb9e36324c2faf2aef4c5c4a204fed5a2220ccb (patch)
treee3591ed7f06860e978f8609143239cfb86d4dee8 /epan/dissectors/packet-diameter.c
parent28e58deeb19b3bb1e9b43cac4a96b054f9d94b08 (diff)
Present diameter time as UTC time rather than the local time zone of the machine running Ethereal is at.
Insert a comment that time before 1970 will not be presented properly. svn path=/trunk/; revision=13573
Diffstat (limited to 'epan/dissectors/packet-diameter.c')
-rw-r--r--epan/dissectors/packet-diameter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c
index cf5def3579..ed2fc9b9e5 100644
--- a/epan/dissectors/packet-diameter.c
+++ b/epan/dissectors/packet-diameter.c
@@ -1784,17 +1784,17 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
if (avpDataLength == 4) {
nstime_t data;
gchar buffer[64];
- struct tm *ltp;
+ struct tm *gmtp;
data.secs = tvb_get_ntohl(tvb, offset);
- /* TODO Change this to use the routine ntp_fmt_ts from packet NTP instead ??? Note uses 64 bits */
+ /* Present the time as UTC, Time before 00:00:00 UTC, January 1, 1970 can't be presented correctly */
if ( data.secs >= NTP_TIME_DIFF){
data.secs -= NTP_TIME_DIFF;
data.nsecs = 0;
- ltp = localtime(&data.secs);
+ gmtp = gmtime(&data.secs);
strftime(buffer, 64,
- "%a, %d %b %Y %H:%M:%S %z", ltp);
+ "%a, %d %b %Y %H:%M:%S UTC", gmtp);
proto_tree_add_time_format(avpi_tree, hf_diameter_avp_data_time,
tvb, offset, avpDataLength, &data,