|
@ -24,10 +24,10 @@ func FormatDate(str string) string { |
|
|
func GetTodayStartTimeStamp() int64 { |
|
|
func GetTodayStartTimeStamp() int64 { |
|
|
|
|
|
|
|
|
var reserveTime time.Time |
|
|
var reserveTime time.Time |
|
|
loc, _ := time.LoadLocation("Asia/Shanghai") |
|
|
|
|
|
|
|
|
// loc, _ := time.LoadLocation(time.Location.String())
|
|
|
|
|
|
|
|
|
date := time.Now().Format("2006-01-02") |
|
|
date := time.Now().Format("2006-01-02") |
|
|
reserveTime, _ = time.ParseInLocation("2006-01-02", date, loc) |
|
|
|
|
|
|
|
|
reserveTime, _ = time.ParseInLocation("2006-01-02", date, time.Local) |
|
|
return reserveTime.Unix() |
|
|
return reserveTime.Unix() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -35,10 +35,10 @@ func GetTodayStartTimeStamp() int64 { |
|
|
func GetTodayEndTimeStamp() int64 { |
|
|
func GetTodayEndTimeStamp() int64 { |
|
|
|
|
|
|
|
|
var reserveTime time.Time |
|
|
var reserveTime time.Time |
|
|
loc, _ := time.LoadLocation("Asia/Shanghai") |
|
|
|
|
|
|
|
|
// loc, _ := time.LoadLocation("Asia/Shanghai")
|
|
|
|
|
|
|
|
|
date := time.Now().Format("2006-01-02") |
|
|
date := time.Now().Format("2006-01-02") |
|
|
reserveTime, _ = time.ParseInLocation("2006-01-02 15:04:05", date+" 23:59:59", loc) |
|
|
|
|
|
|
|
|
reserveTime, _ = time.ParseInLocation("2006-01-02 15:04:05", date+" 23:59:59", time.Local) |
|
|
return reserveTime.Unix() |
|
|
return reserveTime.Unix() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|