update parse time

This commit is contained in:
shoopea 2019-12-19 11:34:11 +08:00
parent 0fa8592c65
commit 74e6c40a70
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ func cronGetHammerTime() {
return
}
clt.Mux.Unlock()
p := JobPayloadGetHammertime{}
p := JobPayloadGetHammerTime{}
b, _ := json.Marshal(&p)
err = createJobCallback(objSubTypeJobGetHammerTime, clt.TGUserID64, objSubTypeMessageTimeAck, b, 1*time.Minute)
logOnError(err, "cronGetHammerTime : createJobCallback")

2
msg.go
View File

@ -436,7 +436,7 @@ func parseSubTypeMessageTimeAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWars
cwm.Hour, _ = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Hour}"), 10, 64)
cwm.Minute, _ = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Minute}"), 10, 64)
cwm.Day, _ = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Day}"), 10, 64)
cwm.Month = int64(chatWarsMonth[r.ReplaceAllString(d, "${Month}")])
cwm.Month = int64(chatWarsMonth[r.ReplaceAllString(m.Text, "${Month}")])
cwm.Year, _ = strconv.ParseInt(r.ReplaceAllString(m.Text, "${Year}"), 10, 64)
cwm.Weather = r.ReplaceAllString(m.Text, "${Weather}")
cwm.WeatherNext = r.ReplaceAllString(m.Text, "${WeatherNext}")