Golang时间格式化为特定时间戳

I'm trying to format a time.Time type to a particular time of yesterday (particularly 23:59:59)

I have one function which converts current time to IST

func getTimeInIST() time.Time {
    loc, _ := time.LoadLocation("Asia/Kolkata")
    now := time.Now().In(loc)
    return now
}

another function which converts to the day before

func GetYesterdaysDateFromTime() time.Time{
    return getTimeInIST().AddDate(0, 0, -1)
}

I want to format the above to a time stamp of date 2009-06-12 23:59:59 for which I do

yesterday := common.GetYesterdaysDateFromTime()
yesterday.Format("2006-01-02 23:59:59")

but I get this 2019-06-11 118:589:589

what am I doing wrong?

Your time format is wrong. The reference time in Go is Mon Jan 2 15:04:05 MST 2006

func getTimeInIST() time.Time {
    loc, _ := time.LoadLocation("Asia/Kolkata")
    now := time.Now().In(loc)
    return now
}
func GetYesterdaysDateFromTime() time.Time {
    return getTimeInIST().AddDate(0, 0, -1)
}

func main() {
    yesterday := GetYesterdaysDateFromTime()
    print(yesterday.Format("2006-01-02 15:04:05"))
}

This prints:

2019-06-11 20:37:04