Getting date locally by
DATE=`date +%Y-%m-%d`
works fine, but at Team City the same script returns 1m13. I think, because of 13/08/18. Any ideas will be helpful.
Have found a solution. TeamCity uses percent signs for its properties. So to use % in TeamCity we should escape it with other %, i.e. for % it must be %%.
date +%Y-%m-%d
would output1m13
.