Matthieu Patou mat+Informatique.Samba at
Tue Apr 13 22:48:43 MDT 2010

Hello Jelmer and all,

I have the impression that the return of the py_unix2nttime should be 
constructing the PyLong not from a long (which on my pc is 4 bytes, but 
from long long. With something like this.

-       return PyInt_FromLong((uint64_t)nt);
+       return PyLong_FromLongLong((uint64_t)nt);

I'm saying so because if I try then to inject the integer into 
nt_time_string I get some dates in 2038 ... but if I do in the C binding :
unix_to_nt_time(&nt2,1271196977) + a call to nt_time_string I get 
something sensible.


More information about the samba-technical mailing list