So, I wanted to add a timestamp to my terminal prompt and I followed this askUbuntu answer to do so. And it works fine. In my terminal preferences I have set the new tab to open the present working directory. After adding the export PROMPT_COMMAND in .bash_profile, however my new tab opens the default directory. When I comment out that line, it works normally again.
Why does this happen? How can I get timestamps on my terminal prompt without messing up my new tab settings