This is because OS X/macOS and Linux use two different sets of tools. Linux uses the GNU version of the date command (hence, GNU/Linux). The solution would be to install GNU Core Utilities replacing macOS Utilities:
*Homebrew:*
``brew install coreutils``
*MacPorts*
``sudo port install coreutils``
Set your PATH to: ``PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"``
Run ``which date``, it must show ``/usr/local/opt/coreutils/libexec/gnubin/date`` and not ``/bin/date``. Re-run the above command, it should work fine!