30

When developing bot for Telegram is there any way to get user timezone? Date field in Message object contains UNIX timestamp only. I want to create bot sending some messages an fixed time of day to subscribed user. User can have different time zones and I don't want to force users to explicit send their timezone to bot in message.

nnesterov
  • 1,232
  • 1
  • 10
  • 27

2 Answers2

27

It's imposible by standard Bot API.

You can ask user for location, and next, from this location calculate timezone for user.

Danil Pyatnitsev
  • 2,172
  • 2
  • 26
  • 39
3

I've added /set_utc_offset command to my bot where users enter the time difference in minutes compared to UTC

budiDino
  • 13,044
  • 8
  • 95
  • 91