datetime convertion and div fixes

the stuff to look at is the new api for python datetime. look at diff for test_highlevel.py