some datetime bugfixes