rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.69k stars 1.19k forks source link

Will the Year 2038 problem affect this library? #714

Open EXL opened 4 years ago

EXL commented 4 years ago

Hi, I have a little question. I noticed that Integer is used to represent the message date instead of Long.

https://github.com/rubenlagus/TelegramBots/blob/32be70c9ebc37609a2a408267281dac602f6b236/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Message.java#L71-L76

A similar situation with the messageId in chats.

Using Integer instead of Long is the Telegram Bot API limitation or is there some other explanation?

rubenlagus commented 4 years ago

It is a Telegram API side situation but we still have time until 2028: https://core.telegram.org/bots/api#message

EXL commented 3 years ago

The user_id field has become 64-bit integer in the Telegram Bot API 5.1 today: https://core.telegram.org/bots/api#message

I wonder what fields except date will be 64-bit wide integer next: message_id or update_id...