Quantcast
Channel: How do I set current Unix time in milliseconds? - Server Fault
Browsing all 4 articles
Browse latest View live

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 Article


Answer 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 Article


Answer 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 Article

How 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
Browsing all 4 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>