From fa7057b72723a7999dffc1de9bdf97d13f12079c Mon Sep 17 00:00:00 2001 From: Adam Misnyovszki Date: Mon, 5 May 2014 19:21:01 +0200 Subject: [PATCH] Trust add datetime fix Fixes trust add, since now datetime object is returned for 'modifytimestamp', which cannot be split like a string. Reviewed-By: Nathaniel McCallum --- ipaserver/dcerpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py index 3b89adc08..312761662 100644 --- a/ipaserver/dcerpc.py +++ b/ipaserver/dcerpc.py @@ -1107,7 +1107,7 @@ class TrustDomainJoins(object): # Use realmdomains' modification timestamp to judge records last update time entry = self.api.Backend.ldap2.get_entry(realm_domains['dn'], ['modifyTimestamp']) # Convert the timestamp to Windows 64-bit timestamp format - trust_timestamp = long(time.mktime(time.strptime(entry['modifytimestamp'][0][:14], "%Y%m%d%H%M%S"))*1e7+116444736000000000) + trust_timestamp = long(time.mktime(entry['modifytimestamp'][0].timetuple())*1e7+116444736000000000) for dom in realm_domains['associateddomain']: ftinfo = dict()