Timeresolution in milliseconds on openWRT

Hi there!

I'm trying to get the date in a resolution of Milliseconds (DD/MM/YYYY hh:mm:ss::milliseconds). Since date +%N dose not work (only returns "%N) I did not find any way to accomplish this. To clarify: The Time hast to be the one of a time server, so it is the actual time.

Hope there is a easier way, then compiling an own program, since when I try to install openwrt-yun in order to crosscompile there are always errors (on my Arch Linux and also on a Debian VM).

/bin/date --help
BusyBox v1.19.4 (2014-09-03 19:18:17 CEST) multi-call binary.

BusyBox’s Date does not support “%N”.

opkg update
opkg list |grep date
coreutils-date - 8.16-1 - Full version of standard GNU date utility. Normally, you would not use this package, since the functionality in BusyBox is more than sufficient.

Not true this case.

opkg update
opkg install coreutils-date
/usr/bin/date "+%d/%m/%Y%l:%M:%S::%N"
16/11/2014 2:08:14::883694217

Thank you very much, saved my day! Didn't know there is the possibility to install the original date function.

The %N is the number of nanoseconds elapsed in the current second.

It is not milliseconds!