forked from mirror/client_golang
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:
commit
ff1d4e21c1
|
@ -873,5 +873,5 @@ func (c apiClient) Do(ctx context.Context, req *http.Request) (*http.Response, [
|
|||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue