diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-05-18 09:37:31 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-05-18 09:37:31 +0100 |
commit | ca4398f924f39fc09a82fc890bab9c0c1d189d07 (patch) | |
tree | 4754fc62f472aab92d4d0c8ab1c79cb1739a4fe9 /summainlib.py | |
parent | bf50667319b8886884471dd813ec0123edb6301a (diff) | |
download | summain-ca4398f924f39fc09a82fc890bab9c0c1d189d07.tar.gz |
Document sub-second timestamps in manpage.
Also fix code to work with microsecond precision.
Diffstat (limited to 'summainlib.py')
-rw-r--r-- | summainlib.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/summainlib.py b/summainlib.py index 57a29ad..6b0d98d 100644 --- a/summainlib.py +++ b/summainlib.py @@ -217,8 +217,7 @@ class FilesystemObject(object): def format_time(self, timestamp): s = time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(timestamp)) fract, whole = math.modf(timestamp) - if fract > 0.0: - s += ('%g' % fract)[1:] # Skip leading '.' + s += ('%.6f' % fract)[1:] # Skip leading '.' s += ' +0000' return s |