X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fdentry.c;h=8a285e25a0b6f4590a4efac5d3e622eced0e8b42;hp=4d3fc6825e41c726e6a3e8d09644d2b49557a89f;hb=72f16c2c9e53f83210e8679f487d4a64d8c897e7;hpb=b6fa6d370a09247a608e6a46a3d9e761d10a8a39 diff --git a/src/dentry.c b/src/dentry.c index 4d3fc682..8a285e25 100644 --- a/src/dentry.c +++ b/src/dentry.c @@ -479,6 +479,8 @@ int print_dentry(struct dentry *dentry, void *lookup_table) { const u8 *hash; struct lookup_table_entry *lte; + time_t time; + char *p; printf("[DENTRY]\n"); printf("Length = %"PRIu64"\n", dentry->length); @@ -503,9 +505,21 @@ int print_dentry(struct dentry *dentry, void *lookup_table) time_t creat_time = wim_timestamp_to_unix(dentry->creation_time); time_t access_time = wim_timestamp_to_unix(dentry->last_access_time); time_t mod_time = wim_timestamp_to_unix(dentry->last_write_time); - printf("Creation Time = %s", asctime(gmtime(&creat_time))); - printf("Last Access Time = %s", asctime(gmtime(&access_time))); - printf("Last Write Time = %s", asctime(gmtime(&mod_time))); + + time = wim_timestamp_to_unix(dentry->creation_time); + p = asctime(gmtime(&time)); + *(strrchr(p, '\n')) = '\0'; + printf("Creation Time = %s UTC\n", p); + + time = wim_timestamp_to_unix(dentry->last_access_time); + p = asctime(gmtime(&time)); + *(strrchr(p, '\n')) = '\0'; + printf("Last Access Time = %s UTC\n", p); + + time = wim_timestamp_to_unix(dentry->last_write_time); + p = asctime(gmtime(&time)); + *(strrchr(p, '\n')) = '\0'; + printf("Last Write Time = %s UTC\n", p); printf("Reparse Tag = 0x%"PRIx32"\n", dentry->reparse_tag); printf("Hard Link Group = 0x%"PRIx64"\n", dentry->hard_link);