Search code examples
python-3.xtelegramtelegram-botpython-telegram-botpy-telegram-bot-api

Does the telegram Location object have a timestamp?


Assume that my bot receives a message from the user which is a Location object, does the Location have a timestamp? to when was the location captured? (not the msg)

Thanks


Solution

  • No, looking at the Location object, there does not seem to be a field that hold the time the location was captured.


    For live-locations, there is a field which indicated the time relative to the message sending the first location:

    Field: live_period
    Type : Integer
    Description: Optional. Time relative to the message sending date, during which the location can be updated; in seconds. For active live locations only.