datetime conversion fix
closes #399
thanks Felix Gilcher