diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-01-22 02:00:27 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2000-01-22 02:00:27 +0000 |
commit | c02828e1a2b58fafe980c879df1b5beb272f41b6 (patch) | |
tree | a5aff911ef473bb8dd6d834f97039812ef09d46d /packet-ntp.c | |
parent | 649bc15d5233ee0679162210b92a23676c62aa10 (diff) |
"tm_mon" in a "struct tm" is 0-based, not 1-based; when printing the
month number, add 1 to "tm_mon".
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1519 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ntp.c')
-rw-r--r-- | packet-ntp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packet-ntp.c b/packet-ntp.c index 425348ef3f..6b97d8a530 100644 --- a/packet-ntp.c +++ b/packet-ntp.c @@ -2,7 +2,7 @@ * Routines for NTP packet dissection * Copyright 1999, Nathan Neulinger <nneul@umr.edu> * - * $Id: packet-ntp.c,v 1.8 2000/01/07 22:05:34 guy Exp $ + * $Id: packet-ntp.c,v 1.9 2000/01/22 02:00:27 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -217,8 +217,8 @@ ntp_fmt_ts(unsigned char * reftime, char* buff) bd = gmtime(&temptime); fractime = bd->tm_sec + tempfrac / 4294967296.0; snprintf(buff, NTP_TS_SIZE, "%04d-%02d-%02d %02d:%02d:%07.4f UTC", - bd->tm_year + 1900, bd->tm_mon, bd->tm_mday, bd->tm_hour, - bd->tm_min, fractime); + bd->tm_year + 1900, bd->tm_mon + 1, bd->tm_mday, + bd->tm_hour, bd->tm_min, fractime); } return buff; } |