Bug 1861 - date doesn't support '%N'
Summary: date doesn't support '%N'
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.13.x
Hardware: Other Linux
: P5 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-30 12:09 UTC by frater
Modified: 2010-06-04 16:20 UTC (History)
1 user (show)

See Also:
Host: DD-WRT
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description frater 2010-05-30 12:09:25 UTC
I would like to have support for 'date +%s.%N' to get nanoseconds...
nanoseconds is not really what I'm after, but I do like to have milliseconds so I can use it in scripts like this:

start=`date +%s.%N`
sleep 1
echo "`date +%s.%N` - ${start}" | bc
echo "`date +%s.%N` - ${start}" | bc | awk '{printf "%.2f\n", $0}' 

I'm using busybox 1.13 on DD-WRT (standard shell there).
Comment 1 Denys Vlasenko 2010-06-04 16:20:04 UTC
Fixed in git, will be in 1.17.x