Added get-time exercise

This commit is contained in:
raul 2024-03-25 17:24:03 +01:00
parent 89fce7631b
commit 285de706f7
2 changed files with 14 additions and 0 deletions

3
get-time/go.mod Normal file
View File

@ -0,0 +1,3 @@
module get-time
go 1.22.1

11
get-time/main.go Normal file
View File

@ -0,0 +1,11 @@
package main
import (
"fmt"
"time"
)
func main() {
t := time.Now()
fmt.Printf("%d-%02d-%02dT%02d:%02d:%02d\n", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second())
}