diff --git a/td.go b/td.go index a04e19d..9f1ee82 100644 --- a/td.go +++ b/td.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "math" + "strconv" "time" "github.com/Arman92/go-tdlib" @@ -151,7 +152,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { } if m.ID64 < lastParsedID64 { lastParsedID64 = msg.ID - lastParsedTime = time.Unix(int64(m.Date), 0) + lastParsedTime = m.Date } if msgParsed%1000 == 0 { fmt.Printf("Waiting : %d messages retrieved out of %d dating back %s (%d) ...\n", msgCount, msgParsed, lastParsedTime.Format(time.RFC3339), lastParsedID64)