|
@ -1,7 +1,6 @@ |
|
|
package helper |
|
|
package helper |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"git.tetele.net/tgo/helper" |
|
|
|
|
|
"strconv" |
|
|
"strconv" |
|
|
"time" |
|
|
"time" |
|
|
) |
|
|
) |
|
@ -85,7 +84,7 @@ func RFC3339ToCSTLayout(value string) (string, error) { |
|
|
func DatetimeToUnix(value string) int64 { |
|
|
func DatetimeToUnix(value string) int64 { |
|
|
loc, _ := time.LoadLocation("Asia/Shanghai") |
|
|
loc, _ := time.LoadLocation("Asia/Shanghai") |
|
|
|
|
|
|
|
|
reserveTime, _ := time.ParseInLocation("2006-01-02 15:04:05", helper.ToStr(value), loc) |
|
|
|
|
|
|
|
|
reserveTime, _ := time.ParseInLocation("2006-01-02 15:04:05", value, loc) |
|
|
|
|
|
|
|
|
return reserveTime.Unix() |
|
|
return reserveTime.Unix() |
|
|
} |
|
|
} |