|
|
@ -28,7 +28,7 @@ func GetUnixNow() Timestamp {
|
|
|
|
|
|
|
|
|
|
|
|
// GetUnix 嘗試取得時間戳記
|
|
|
|
// GetUnix 嘗試取得時間戳記
|
|
|
|
func GetUnix(format, datetime string) (Timestamp, error) {
|
|
|
|
func GetUnix(format, datetime string) (Timestamp, error) {
|
|
|
|
t, err := time.Parse(format, datetime)
|
|
|
|
t, err := time.ParseInLocation(format, datetime, Local)
|
|
|
|
return Timestamp(t.Unix()), err
|
|
|
|
return Timestamp(t.Unix()), err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|