.jpg

    start_time_int64 := int64(res.StartTime) //时间戳int转为int64
    timeTemplate := "2006-01-02 15:04:05" //常规类型
    start_time_string := time.Unix(start_time_int64, 0).Format(timeTemplate)
    start_time, _ := time.ParseInLocation(timeTemplate, start_time_string, time.Local) //这里按照当前时区转

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code