With the introduction of Catalina, macOS now uses Zsh by default. After only a few months, I finally took some time to re-create my preferred command prompt with timestamps. Zsh is actually able to render this a little more elegantly than Bash, with explicit support for right-aligned prompts:

As you can see in the screenshot, I’ve updated it to also include the current git branch if you’re in a git repository. Simply add the following to ~/.zshrc:

autoload -Uz vcs_info
precmd_functions+=( vcs_info )
zstyle ':vcs_info:git:*' formats '%F{magenta}%b%f '
zstyle ':vcs_info:*' enable git
setopt prompt_subst
PROMPT="%[email protected]%m %1~ \$vcs_info_msg_0_%# "
RPROMPT="%F{250}$( date "+%H:%M:%S %Z" )%f"

Update: I had previously suggested that any Zsh configuration file could be used, but Michael has informed me that ~/.zshrc is the correct file to use when configuring an interactive shell. You can find a more in-depth discussion of this at Scripting OS X.