diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-09-08 12:54:13 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-09-08 12:54:13 +1000 |
commit | 3eb6f79a02de6820581b91f8d9be80b8dd620119 (patch) | |
tree | 3567dccbd6e247f72fe079e4592f0084b1ac0059 /source4/scripting/python/misc.i | |
parent | dadd59ba401943d0cf5e4d07959456b70a3c11d9 (diff) | |
parent | 1efff73068e933dd0b4cc81ff901f6010fda9a6b (diff) | |
download | samba-3eb6f79a02de6820581b91f8d9be80b8dd620119.tar.gz samba-3eb6f79a02de6820581b91f8d9be80b8dd620119.tar.bz2 samba-3eb6f79a02de6820581b91f8d9be80b8dd620119.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into trusted-domains
(This used to be commit a057c3ed9df2670e5cad5f1807e280d77eb58cb0)
Diffstat (limited to 'source4/scripting/python/misc.i')
-rw-r--r-- | source4/scripting/python/misc.i | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/scripting/python/misc.i b/source4/scripting/python/misc.i index 19318cdb17..81be7d5c16 100644 --- a/source4/scripting/python/misc.i +++ b/source4/scripting/python/misc.i @@ -106,3 +106,16 @@ bool dsdb_set_ntds_invocation_id(struct ldb_context *ldb, const char *guid) char *private_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, const char *name); +typedef unsigned long time_t; + +/* + convert from unix time to NT time +*/ +%inline %{ +uint64_t unix2nttime(time_t t) +{ + NTTIME nt; + unix_to_nt_time(&nt, t); + return (uint64_t)nt; +} +%} |