title: datetime: Round/trim number of digits in microseconds
body: <p>Currently I am logging stuff and I am using my own formatter with a custom <code>formatTime()</code>:</p>
  
  <pre><code>def formatTime(self, _record, _datefmt):
      t = datetime.datetime.now()
      return t.strftime('%Y-%m-%d %H:%M:%S.%f')
  </code></pre>
  
  <p>My issue is that the microseconds, <code>%f</code>, are six digits. Is there anyway to spit out less digits, like the first three digits of the microseconds?</p>