| 
      
            Lines 240-251
          def encode_s4_resultlist(s4_resultlist):
      
      
        Link Here
      
     | 
  
        
          | 240 | 
           | 
          240 | 
           | 
        
        
          | 241 | 
          def unix2s4_time(l):  | 
          241 | 
          def unix2s4_time(l):  | 
        
        
          | 242 | 
          	d = 116444736000000000  # difference between 1601 and 1970  | 
          242 | 
          	d = 116444736000000000  # difference between 1601 and 1970  | 
        
          
            
              | 243 | 
              	return int(calendar.timegm(time.strptime(l, "%Y-%m-%d")) - 86400) * 10000000 + d  # AD stores end of day in accountExpires  | 
              243 | 
              	return int(time.mktime(time.strptime(l, "%Y-%m-%d"))) * 10000000 + d  # AD stores end of day in accountExpires  | 
            
        
          | 244 | 
           | 
          244 | 
           | 
        
        
          | 245 | 
           | 
          245 | 
           | 
        
        
          | 246 | 
          def s42unix_time(l):  | 
          246 | 
          def s42unix_time(l):  | 
        
        
          | 247 | 
          	d = 116444736000000000  # difference between 1601 and 1970  | 
          247 | 
          	d = 116444736000000000  # difference between 1601 and 1970  | 
        
          
            
              | 248 | 
              	return time.strftime("%Y-%m-%d", time.gmtime((l - d) / 10000000 + 86400))  # shadowExpire treats day of expiry as exclusive | 
              248 | 
              	return time.strftime("%Y-%m-%d", time.localtime((l - d) / 10000000))  # shadowExpire treats day of expiry as exclusive | 
            
        
          | 249 | 
           | 
          249 | 
           | 
        
        
          | 250 | 
           | 
          250 | 
           | 
        
        
          | 251 | 
          def samba2s4_time(l):  | 
          251 | 
          def samba2s4_time(l):  |