diff --git a/get-time/go.mod b/get-time/go.mod new file mode 100644 index 0000000..60fc611 --- /dev/null +++ b/get-time/go.mod @@ -0,0 +1,3 @@ +module get-time + +go 1.22.1 diff --git a/get-time/main.go b/get-time/main.go new file mode 100644 index 0000000..a06fc7b --- /dev/null +++ b/get-time/main.go @@ -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()) +}