Merge pull request #619 from jacksontj/time_formatting

Handle formatting when the time in nanoseconds requires more than a single int64
This commit is contained in:
Björn Rabenstein 2019-07-09 22:55:12 +02:00 committed by GitHub
commit ff1d4e21c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -873,5 +873,5 @@ func (c apiClient) Do(ctx context.Context, req *http.Request) (*http.Response, [
} }
func formatTime(t time.Time) string { func formatTime(t time.Time) string {
return strconv.FormatFloat(float64(t.UnixNano())/1e9, 'f', -1, 64) return strconv.FormatFloat(float64(t.Unix())+float64(t.Nanosecond())/1e9, 'f', -1, 64)
} }