我在玩時區(qū)并注意到一些奇怪的事情。我目前在 BST 時區(qū),比格林威治標準時間早一個小時。 now := time.Now() location, _ := time.LoadLocation("Atlantic/Cape_Verde") timeAtZone := now.In(location) fmt.Println(timeAtZone) timestamp = timeAtZone.Unix() fmt.Println(timestamp) fmt.Println(now.Add(-time.Hour).UTC().Unix()) fmt.Println(now.UTC().Unix())您會注意到時間戳是我當前時區(qū)的 BST 時間戳。我如何獲得格林威治標準時間的時間戳???http://play.golang.org/p/oq0IRYa0h7
獲取給定的時區(qū)時間戳
30秒到達戰(zhàn)場
2021-10-25 17:03:44