diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-07-11 13:45:50 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-07-11 14:32:45 +1000 |
commit | 396beee776778af7c9b7d48d7c977b32b3ee4654 (patch) | |
tree | e9982872edea1ddf92268e01e2cae8b2b0092187 /source4/scripting | |
parent | 723fc5fadd55987d38641508a3c50314147588c3 (diff) | |
download | samba-396beee776778af7c9b7d48d7c977b32b3ee4654.tar.gz samba-396beee776778af7c9b7d48d7c977b32b3ee4654.tar.bz2 samba-396beee776778af7c9b7d48d7c977b32b3ee4654.zip |
s4-provision: use samba.unix2nttime() instead of hard coding NTTIME offsets
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/samba/provision/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py index 37d3fcbf75..91c4ef7f80 100644 --- a/source4/scripting/python/samba/provision/__init__.py +++ b/source4/scripting/python/samba/provision/__init__.py @@ -1256,7 +1256,7 @@ def setup_samdb(path, session_info, provision_backend, lp, names, setup_modify_ldif(samdb, setup_path("provision_basedn_modify.ldif"), { "DOMAINDN": names.domaindn, - "CREATTIME": str(int((time.time() + 11644473600) * 1e7)), # seconds -> MS time (since 1/1/1601) + "CREATTIME": str(samba.unix2nttime(int(time.time()))), "NEXTRID": str(next_rid), "DEFAULTSITE": names.sitename, "CONFIGDN": names.configdn, @@ -1343,7 +1343,7 @@ def setup_samdb(path, session_info, provision_backend, lp, names, "DOMAINDN": names.domaindn}) logger.info("Setting up sam.ldb data") setup_add_ldif(samdb, setup_path("provision.ldif"), { - "CREATTIME": str(int((time.time() + 11644473600) * 1e7)), # seconds -> MS time (since 1/1/1601) + "CREATTIME": str(samba.unix2nttime(int(time.time()))), "DOMAINDN": names.domaindn, "NETBIOSNAME": names.netbiosname, "DEFAULTSITE": names.sitename, |