commit be78c42
Hubert Hirtz
·
2021-01-06 08:29:17 +0000 UTC
parent 9ab0c33
Chathistory: don't send invalid timestamps
1 files changed,
+2,
-2
+2,
-2
1@@ -445,8 +445,8 @@ func (s *Session) requestHistory(act actionRequestHistory) (err error) {
2 return
3 }
4
5- t := act.Before.UTC()
6- err = s.send("CHATHISTORY BEFORE %s timestamp=%04d-%02d-%02dT%02d:%02d:%02d.%03dZ 100\r\n", act.Target, t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second()+1, t.Nanosecond()/1e6)
7+ t := act.Before.UTC().Add(1 * time.Second)
8+ err = s.send("CHATHISTORY BEFORE %s timestamp=%04d-%02d-%02dT%02d:%02d:%02d.%03dZ 100\r\n", act.Target, t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second(), t.Nanosecond()/1e6)
9
10 return
11 }