summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/time.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/lib/time.c b/source4/lib/time.c
index fd005215a1..e214179b6c 100644
--- a/source4/lib/time.c
+++ b/source4/lib/time.c
@@ -346,7 +346,11 @@ char *timestring(TALLOC_CTX *mem_ctx, time_t t)
*/
const char *nt_time_string(TALLOC_CTX *mem_ctx, NTTIME nt)
{
- time_t t = nt_time_to_unix(nt);
+ time_t t;
+ if (nt == 0) {
+ return "NTTIME(0)";
+ }
+ t = nt_time_to_unix(nt);
return timestring(mem_ctx, t);
}