convert date to timestamp bugfix