mirror of https://github.com/Xhofe/alist
parent
0f03a747d8
commit
a64dd4885e
|
@ -48,7 +48,7 @@ func calSign(body, ts, randStr string) string {
|
|||
}
|
||||
|
||||
func getTime(t string) time.Time {
|
||||
stamp, _ := time.ParseInLocation("20060102150405", t, time.Local)
|
||||
stamp, _ := time.ParseInLocation("20060102150405", t, utils.CNLoc)
|
||||
return stamp
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,10 @@ import (
|
|||
"time"
|
||||
)
|
||||
|
||||
var CNLoc = time.FixedZone("UTC", 8*60*60)
|
||||
|
||||
func MustParseCNTime(str string) time.Time {
|
||||
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05 -07", str+" +08", time.Local)
|
||||
lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05 -07", str+" +08", CNLoc)
|
||||
return lastOpTime
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue