"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
This commit is contained in:
parent
1f6d7eb0e5
commit
5b5f2271cd
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for smb packet dissection
|
||||
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
|
||||
*
|
||||
* $Id: packet-smb.c,v 1.59 2000/01/07 22:05:36 guy Exp $
|
||||
* $Id: packet-smb.c,v 1.60 2000/01/22 02:00:24 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -476,7 +476,7 @@ dissect_smbu_date(guint16 date, guint16 time)
|
|||
|
||||
_gtime = gmtime(<ime);
|
||||
sprintf(datebuf, "%04d-%02d-%02d",
|
||||
1900 + (_gtime -> tm_year), _gtime -> tm_mon, _gtime -> tm_mday);
|
||||
1900 + (_gtime -> tm_year), 1 + (_gtime -> tm_mon), _gtime -> tm_mday);
|
||||
|
||||
return datebuf;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* In particular I have not had an opportunity to see how it
|
||||
* responds to SRVLOC over TCP.
|
||||
*
|
||||
* $Id: packet-srvloc.c,v 1.5 2000/01/07 22:05:40 guy Exp $
|
||||
* $Id: packet-srvloc.c,v 1.6 2000/01/22 02:00:24 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -157,8 +157,9 @@ dissect_authblk(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
|
|||
floatsec = stamp->tm_sec + pntohl(&pd[offset + 4]) / 4294967296.0;
|
||||
proto_tree_add_text(tree, offset, 8,
|
||||
"Timestamp: %04d-%02d-%02d %02d:%02d:%07.4f UTC",
|
||||
stamp->tm_year + 1900, stamp->tm_mon, stamp->tm_mday,
|
||||
stamp->tm_hour, stamp->tm_min, floatsec);
|
||||
stamp->tm_year + 1900, stamp->tm_mon + 1,
|
||||
stamp->tm_mday, stamp->tm_hour, stamp->tm_min,
|
||||
floatsec);
|
||||
proto_tree_add_text(tree, offset + 8, 2, "Block Structure Desciptor: %u",
|
||||
pntohs(&pd[offset + 8]));
|
||||
length = pntohs(&pd[offset + 10]);
|
||||
|
|
Loading…
Reference in New Issue