Skip to content

Commit da62f74

Browse files
Update and rename utc-time-date.go to utcTimeDate.go
1 parent caa411c commit da62f74

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

utc-time-date.go

Lines changed: 0 additions & 18 deletions
This file was deleted.

utcTimeDate.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"time"
6+
)
7+
8+
func greetingTimeDate() {
9+
greeting := "Hello!"
10+
currentTime := time.Now()
11+
dateFormat := currentTime.Format("01/02/2006")
12+
timeFormat := currentTime.Format("03:04PM")
13+
fmt.Println(greeting + ", the current date is " + dateFormat + ", and the current UTC time is " + timeFormat + ".")
14+
}
15+
16+
func main() {
17+
greetingTimeDate()
18+
}

0 commit comments

Comments
 (0)