Oops
This commit is contained in:
parent
d69e748968
commit
1ae8af29ce
1 changed files with 2 additions and 1 deletions
|
@ -186,7 +186,8 @@ func parseDuration(date string) (time.Time, error) {
|
|||
default:
|
||||
return now, fmt.Errorf("Non capisco quando dovrei ricordartelo!")
|
||||
}
|
||||
targetDate := time.Date(year, month, day, hour, min, sec, 0, time.LoadLocation("Local"))
|
||||
loc, _ := time.LoadLocation("Local")
|
||||
targetDate := time.Date(year, month, day, hour, min, sec, 0, loc)
|
||||
if targetDate.Before(now) {
|
||||
return now, fmt.Errorf("Non posso ricordarti cose nel passato!")
|
||||
}
|
||||
|
|
Reference in a new issue