Answers for "golang time.Add with variables"

Go
0

golang time.Add with variables

timein := time.Now().Local().Add(time.Hour * time.Duration(Hours) +
                                 time.Minute * time.Duration(Mins) +
                                 time.Second * time.Duration(Sec))
Posted by: Guest on August-20-2020

Browse Popular Code Answers by Language