Use RFC3339Nano for better precision

This commit is contained in:
Jeff Mitchell 2016-07-25 14:11:57 -04:00
parent 0cfb112e87
commit d2cbe48aaf
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ func (f *FormatJSON) FormatRequest(
// Encode!
enc := json.NewEncoder(w)
return enc.Encode(&JSONRequestEntry{
Time: time.Now().UTC().Format(time.RFC3339),
Time: time.Now().UTC().Format(time.RFC3339Nano),
Type: "request",
Error: errString,
@ -100,7 +100,7 @@ func (f *FormatJSON) FormatResponse(
// Encode!
enc := json.NewEncoder(w)
return enc.Encode(&JSONResponseEntry{
Time: time.Now().UTC().Format(time.RFC3339),
Time: time.Now().UTC().Format(time.RFC3339Nano),
Type: "response",
Error: errString,

View File

@ -1349,7 +1349,7 @@ func (b *SystemBackend) handleKeyStatus(
resp := &logical.Response{
Data: map[string]interface{}{
"term": info.Term,
"install_time": info.InstallTime.Format(time.RFC3339),
"install_time": info.InstallTime.Format(time.RFC3339Nano),
},
}
return resp, nil