summaryrefslogtreecommitdiffstats
path: root/source/auth/auth_sam.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/auth/auth_sam.c')
-rw-r--r--source/auth/auth_sam.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/auth/auth_sam.c b/source/auth/auth_sam.c
index c92cecdde59..558c181f704 100644
--- a/source/auth/auth_sam.c
+++ b/source/auth/auth_sam.c
@@ -88,7 +88,7 @@ static BOOL logon_hours_ok(SAM_ACCOUNT *sampass)
}
lasttime = (time_t)smb_last_time.tv_sec;
- utctime = localtime(&lasttime);
+ utctime = gmtime(&lasttime);
/* find the corresponding byte and bit */
bitpos = (utctime->tm_wday * 24 + utctime->tm_hour) % 168;
@@ -96,7 +96,8 @@ static BOOL logon_hours_ok(SAM_ACCOUNT *sampass)
if (! (hours[bitpos/8] & bitmask)) {
DEBUG(1,("logon_hours_ok: Account for user %s not allowed to logon at this time (%s).\n",
- pdb_get_username(sampass), asctime(utctime) ));
+ pdb_get_username(sampass),
+ asctime(localtime(&lasttime)) ));
return False;
}