verochka/date/date.go

12 lines
230 B
Go

package date
import "time"
func Today(offset time.Duration) string {
location, err := time.LoadLocation("Asia/Novosibirsk")
if err != nil {
panic(err)
}
return time.Now().In(location).Add(offset).Format("2006-01-02")
}