Skip to content

Commit 3ce6665

Browse files
committed
update to use time.RFC3339
1 parent d879c6b commit 3ce6665

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pkg/github/minimal_types.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package github
22

33
import (
4+
"time"
5+
46
"github.com/google/go-github/v82/github"
57
)
68

@@ -197,16 +199,16 @@ func convertToMinimalPullRequest(pr *github.PullRequest) MinimalPullRequest {
197199
}
198200

199201
if pr.CreatedAt != nil {
200-
m.CreatedAt = pr.CreatedAt.Format("2006-01-02T15:04:05Z")
202+
m.CreatedAt = pr.CreatedAt.Format(time.RFC3339)
201203
}
202204
if pr.UpdatedAt != nil {
203-
m.UpdatedAt = pr.UpdatedAt.Format("2006-01-02T15:04:05Z")
205+
m.UpdatedAt = pr.UpdatedAt.Format(time.RFC3339)
204206
}
205207
if pr.ClosedAt != nil {
206-
m.ClosedAt = pr.ClosedAt.Format("2006-01-02T15:04:05Z")
208+
m.ClosedAt = pr.ClosedAt.Format(time.RFC3339)
207209
}
208210
if pr.MergedAt != nil {
209-
m.MergedAt = pr.MergedAt.Format("2006-01-02T15:04:05Z")
211+
m.MergedAt = pr.MergedAt.Format(time.RFC3339)
210212
}
211213

212214
for _, label := range pr.Labels {

0 commit comments

Comments
 (0)