sys.maxint on 64bit systems is quite larger than on 32bit systems.

Also added the datetime import I forgot on my earlier commit.