Bug 1861

Summary: date doesn't support '%N'
Product: Busybox Reporter: frater <fraterbugzilla>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: enhancement CC: busybox-cvs
Priority: P5    
Version: 1.13.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: DD-WRT Target:
Build:

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