Skip to content

Commit 3ebc411

Browse files
committed
Use constant for time formatting
1 parent 7312e5e commit 3ebc411

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

internal/server/server.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import (
2323
"github.com/replicate/cog-runtime/internal/runner"
2424
)
2525

26-
const TimeLayout = "2006-01-02T15:04:05.999999-07:00"
27-
2826
// errAsyncPrediction is a sentinel error used to indicate that a prediction is being served asynchronously, it is not surfaced outside of server
2927
var errAsyncPrediction = errors.New("async prediction")
3028

@@ -458,5 +456,5 @@ func PredictionID() (string, error) {
458456
}
459457

460458
func formatTime(t time.Time) string {
461-
return t.UTC().Format(TimeLayout)
459+
return t.UTC().Format(time.RFC3339Nano)
462460
}

0 commit comments

Comments
 (0)