mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
python/samba: add current_unix_time()
This is needed to get the time from modules in python/samba/netcmd/ where a time.py exist. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
@ -24,6 +24,7 @@ __docformat__ = "restructuredText"
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
import samba.param
|
import samba.param
|
||||||
|
|
||||||
|
|
||||||
@ -358,6 +359,9 @@ def dn_from_dns_name(dnsdomain):
|
|||||||
"""return a DN from a DNS name domain/forest root"""
|
"""return a DN from a DNS name domain/forest root"""
|
||||||
return "DC=" + ",DC=".join(dnsdomain.split("."))
|
return "DC=" + ",DC=".join(dnsdomain.split("."))
|
||||||
|
|
||||||
|
def current_unix_time():
|
||||||
|
return int(time.time())
|
||||||
|
|
||||||
import _glue
|
import _glue
|
||||||
version = _glue.version
|
version = _glue.version
|
||||||
interface_ips = _glue.interface_ips
|
interface_ips = _glue.interface_ips
|
||||||
|
Reference in New Issue
Block a user