package main import ( "fmt" "time" ) func main() { tm := time.Now() tmu := time.Now().UTC() fmt.Println("Current time:", tm) fmt.Println("Current time UTC:", tmu) fmt.Println("") fmt.Println("Put your machine to sleep for 2 minutes now...") <-time.After(1 * time.Minute) now := time.Now() fmt.Println("") fmt.Println("The current time is: ", now) fmt.Println("The previous time was: ", tm) fmt.Println("The difference between these times is: ", now.Sub(tm)) nowu := time.Now().UTC() fmt.Println("") fmt.Println("The current UTC time is: ", nowu) fmt.Println("The previous UTC time was: ", tmu) fmt.Println("The difference between these UTC times is: ", nowu.Sub(tmu)) }