On 07/23/2012 12:37 PM, John Dennis wrote:
Note the timestamps only have 1 second resolution, something which would be easy to fix, so bear that in mind when looking at the output of the script.
This is partially as a note to myself, but also to others who want to test. The following patch should produce timestamps in the debug output with microsecond resolution.
-- John Dennis <jden...@redhat.com> Looking to carve out IT costs? www.redhat.com/carveoutcosts/
diff --git a/ipalib/session.py b/ipalib/session.py index 4b783bb..1cff222 100644 --- a/ipalib/session.py +++ b/ipalib/session.py @@ -628,9 +628,9 @@ mod_auth_kerb. Everything else remains the same. default_max_session_duration = 60*60 # number of seconds -ISO8601_DATETIME_FMT = '%Y-%m-%dT%H:%M:%S' # FIXME jrd, this should be defined elsewhere +ISO8601_DATETIME_FMT = '%Y-%m-%dT%H:%M:%S.%f' # FIXME jrd, this should be defined elsewhere def fmt_time(timestamp): - return time.strftime(ISO8601_DATETIME_FMT, time.localtime(timestamp)) + return datetime.fromtimestamp(timestamp).strftime(ISO8601_DATETIME_FMT) #-------------------------------------------------------------------------------
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel