Created
July 6, 2016 16:03
-
-
Save pedrokoblitz/790d72c710b043e6d27eb15cacb0877c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func TodayDate() time.Time { | |
sp, err := time.LoadLocation("America/Sao_Paulo") | |
if err != nil { | |
panic(err) | |
} | |
now := time.Now().In(sp) | |
year, month, day := now.Date() | |
return time.Date(year, month, day, 0, 0, 0, 0, now.Location()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment