Skip to content
This repository was archived by the owner on Mar 5, 2023. It is now read-only.

Commit 9563fa0

Browse files
committed
lower memory usage by avoiding FixedTime form time.Parse
1 parent 1a16211 commit 9563fa0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ type Timestamp string
2828
// Parse parses a timestamp string into a time.Time object.
2929
// The only time this can fail is if Discord changes their timestamp format.
3030
func (t Timestamp) Parse() (time.Time, error) {
31-
return time.Parse(time.RFC3339, string(t))
31+
tim, err := time.Parse(time.RFC3339, string(t))
32+
return tim.UTC(), err
3233
}
3334

3435
// RESTError stores error information about a request with a bad response code.

0 commit comments

Comments
 (0)