Answer by BleedObsidian for How do I set current Unix time in milliseconds?
There is a better method that doesn't require converting the timestamp to a human-readable date format as in the accepted answer. You were extremely close with your original suggestion:date +"%s.%N" -s...
View ArticleAnswer by coolaj86 for How do I set current Unix time in milliseconds?
Here is a solution (Linux, NOT Unix):date --set="2011-12-07 01:20:15.962"&& date --rfc-3339=nsNote the delay:CURTIME=`date --rfc-3339=ns`date --set="${CURTIME}"NEWTIME=`date --rfc-3339=ns`echo...
View ArticleAnswer by Zoredache for How do I set current Unix time in milliseconds?
If your goal is to set time in with sub-second intervals, then date seems like the wrong command if I am reading the source correctly.Assuming you are using the coreutils version of date, then it...
View ArticleHow do I set current Unix time in milliseconds?
Possible Solutiondate --set="2011-12-07 01:20:15.962"&& date --rfc-3339=nsOriginal QuestionI can get the date with milliseconds like so:date +"%S.%N"date --rfc-3339=nsAccording to man date I...
View Article