summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/time.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/time.c b/source4/lib/time.c
index e95d3a8d17..5fd8aa3081 100644
--- a/source4/lib/time.c
+++ b/source4/lib/time.c
@@ -91,6 +91,12 @@ It's originally in "100ns units since jan 1st 1601"
****************************************************************************/
time_t nt_time_to_unix(NTTIME nt)
{
+ if (nt == 0) {
+ return 0;
+ }
+ if (nt == -1LL) {
+ return (time_t)-1;
+ }
nt += 1000*1000*10/2;
nt /= 1000*1000*10;
nt -= TIME_FIXUP_CONSTANT;