[[time.Parse]]を使う。 ```go package main import ( "fmt" "time" ) func main() { // RFC1123 t1, _ := time.Parse(time.RFC1123, "Fri, 21 Jul 2023 01:17:22 GMT") fmt.Println(t1) // RFC3339 t2, _ := time.Parse(time.RFC3339, "2023-08-25T16:44:00+09:00") fmt.Println(t2) } ``` <button class="playground"><a href="https://go.dev/play/p/SZ9KckCZAyh">Playground</a></button> > [!info] 定義されている日付形式は以下 > https://pkg.go.dev/time#pkg-constants ## 参考 - [Goで時刻を扱うチートシート](https://zenn.dev/hsaki/articles/go-time-cheatsheet)