Date command does not follow Linux specifications (Mac OS X Lion)
man date
indicates that it doesn't go beyond one second. I would recommend trying another language (Python 2):
$ python -c 'import time; print repr(time.time())'
1332334298.898616
For Python 3, use:
$ python -c 'import time; print(repr(time.time()))'
This is because OSX and Linux use two different sets of tools. Linux uses the GNU version of the date
command (hence, GNU/Linux). Remember that Linux is Linux and OS X is Unix. They're different.
You can install the GNU date
command which is included in the "coreutils" package from MacPorts. It will be installed on your system as gdate
. You can either use that, or link the date
binary with the new gdate
binary; your choice.