aboutsummaryrefslogtreecommitdiff
path: root/smbutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'smbutil.c')
-rw-r--r--smbutil.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/smbutil.c b/smbutil.c
index ff32ecce..7f609f7f 100644
--- a/smbutil.c
+++ b/smbutil.c
@@ -770,6 +770,7 @@ smb_fdata1(netdissect_options *ndo,
time_t t;
struct tm *lt;
const char *tstring;
+ char buffer[sizeof("Www Mmm dd hh:mm:ss yyyy\n")];
uint32_t x;
switch (atoi(fmt + 1)) {
@@ -800,8 +801,10 @@ smb_fdata1(netdissect_options *ndo,
}
if (t != 0) {
lt = localtime(&t);
- if (lt != NULL)
- tstring = asctime(lt);
+ if (lt != NULL) {
+ strftime(buffer, sizeof(buffer), "%a %b %e %T %Y%n", lt);
+ tstring = buffer;
+ }
else
tstring = "(Can't convert time)\n";
} else