mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
make nt-time <-> unix-time functions nearly reversible
(This used to be commit bda64a11f7
)
This commit is contained in:
parent
0ed073259b
commit
a98fc57af9
@ -318,8 +318,11 @@ time_t nt_time_to_unix(NTTIME *nt)
|
||||
/* now adjust by 369 years to make the secs since 1970 */
|
||||
d -= TIME_FIXUP_CONSTANT;
|
||||
|
||||
if (!(l_time_min <= d && d <= l_time_max))
|
||||
return(0);
|
||||
if (d <= l_time_min)
|
||||
return (l_time_min);
|
||||
|
||||
if (d >= l_time_max)
|
||||
return (l_time_max);
|
||||
|
||||
ret = (time_t)(d+0.5);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user