aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ntp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-01-22 02:00:27 +0000
committerGuy Harris <guy@alum.mit.edu>2000-01-22 02:00:27 +0000
commit5b5f2271cd73724314f49be784c4b56672722b43 (patch)
treea5aff911ef473bb8dd6d834f97039812ef09d46d /packet-ntp.c
parent1f6d7eb0e51f460146f8f4bd9c2c296cf51ff637 (diff)
"tm_mon" in a "struct tm" is 0-based, not 1-based; when printing the
month number, add 1 to "tm_mon". svn path=/trunk/; revision=1519
Diffstat (limited to 'packet-ntp.c')
-rw-r--r--packet-ntp.c6
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;
}