mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-04 11:07:40 +08:00
fix: uptimes
go time januay=1 时间过久可能返回一个固定的q16 fde9508748b00283b2
This commit is contained in:
parent
5e7ade149f
commit
7cecf01ed2
@ -115,14 +115,7 @@ func genRandomPayloadByDevice(info *Device) map[string]any {
|
|||||||
seed += int64(b)
|
seed += int64(b)
|
||||||
}
|
}
|
||||||
fixedRand := rand.New(rand.NewSource(seed))
|
fixedRand := rand.New(rand.NewSource(seed))
|
||||||
years := now.Year()
|
|
||||||
month := now.Month()
|
|
||||||
if month == 1 {
|
|
||||||
years--
|
|
||||||
month = 12
|
|
||||||
} else {
|
|
||||||
month--
|
|
||||||
}
|
|
||||||
reserved := map[string]string{
|
reserved := map[string]string{
|
||||||
"harmony": "0",
|
"harmony": "0",
|
||||||
"clone": "0",
|
"clone": "0",
|
||||||
@ -130,7 +123,7 @@ func genRandomPayloadByDevice(info *Device) map[string]any {
|
|||||||
"oz": "UhYmelwouA+V2nPWbOvLTgN2/m8jwGB+yUB5v9tysQg=",
|
"oz": "UhYmelwouA+V2nPWbOvLTgN2/m8jwGB+yUB5v9tysQg=",
|
||||||
"oo": "Xecjt+9S1+f8Pz2VLSxgpw==",
|
"oo": "Xecjt+9S1+f8Pz2VLSxgpw==",
|
||||||
"kelong": "0",
|
"kelong": "0",
|
||||||
"uptimes": time.Date(years, month, fixedRand.Intn(27)+1, fixedRand.Intn(60), fixedRand.Intn(60), fixedRand.Intn(60), fixedRand.Intn(1e9), now.Location()).Format("2006-01-02 15:04:05"),
|
"uptimes": time.Unix(now.Unix()-fixedRand.Int63n(86400), 0).Format(time.DateTime),
|
||||||
"multiUser": "0",
|
"multiUser": "0",
|
||||||
"bod": string(info.Board),
|
"bod": string(info.Board),
|
||||||
"brd": string(info.Brand),
|
"brd": string(info.Brand),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user