Skip to content

Commit

Permalink
Time
Browse files Browse the repository at this point in the history
  • Loading branch information
an1l4 committed Jun 21, 2022
1 parent 890e0ae commit 9cfb118
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions time_package.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"fmt"
"time"
)

func main() {
presentTime := time.Now()
fmt.Println(presentTime.Format("01-02-2006 15:04:05 Monday")) //we have to follow the same format 01-02-2006

createDate := time.Date(2018, time.March, 27, 03, 00, 00, 00, time.UTC)
fmt.Println(createDate)
fmt.Println(createDate.Format("01-02-2006 15:04:05 Monday"))
}

0 comments on commit 9cfb118

Please sign in to comment.