Date command with zsh

I am trying to use the command dateto print today's date in format %d.%m.%y-%H:%M:%S. Obviously, I'm just doing this:

date +%d.%m.%y-%H:%M:%S

This works fine in bash, and I get the output that I would expect, but when I do this in zsh, I get what I expect with the prefix '7m', for example

7m07.09.12-16: 49: 37

instead

09/07/12-16: 49: 37

I also get a warning from my terminal. This is called %Sin seconds because when I take it from the end of the command, I do not get "7m" (but obviously I do not have enough seconds from the end of the date).

Can anyone explain why this is happening?

EDIT: more info: I'm on OS X 10.8 and with zsh 4.3.11, oh-my-zsh is installed

+5
source share
2 answers

, , 12 .oh-my-zsh/lib/termsupport.zsh, https://github.com/robbyrussell/oh-my-zsh/issues/521

+3

echo $(...). . :

echo $(date +%d.%m.%y-%H:%M:%S)
+2

All Articles