Fixing an issue with date and timestamps