HW1 is completed
parent
43a5317fed
commit
bd7ece88f4
|
@ -16,6 +16,10 @@ func main() {
|
|||
if err != nil {
|
||||
log.Fatalf("Ошибка запроса: %e", err)
|
||||
}
|
||||
fmt.Printf("current time: %s\n", timeCurrent.Round(time.Second).String())
|
||||
fmt.Printf("exact time: %s\n", timeExact.Round(time.Second).String())
|
||||
fmt.Printf("current time: %s\n", timeFormat(timeCurrent))
|
||||
fmt.Printf("exact time: %s\n", timeFormat(timeExact))
|
||||
}
|
||||
|
||||
func timeFormat(t time.Time) string {
|
||||
return t.Format("2006-01-02 15:04:05 -0700 UTC")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue