eternnoir / pyTelegramBotAPI

Python Telegram bot api.
GNU General Public License v2.0
8.11k stars 2.03k forks source link

Which way should I take to get the user's timezone? #256

Closed hovikk closed 7 years ago

hovikk commented 7 years ago

I have a database with some football matches. So, I have entered separately the values of hours, minutes, days, months and years in UTC. Well, how should I catch the user's timezone to convert the UTC time into the user's local time. And probably I did a mistake by entering the values of date and time separately, so could you also please advice me the best way to change the columns. Any help is appreciated! Thank you!

dmytrostriletskyi commented 7 years ago

If you have question about database, but not about pyTelegramBotAPI — search some topic on the internet. Example, how to change column`s datatype in PostgreSQL— https://www.postgresql.org/docs/current/static/sql-altertable.html

dmytrostriletskyi commented 7 years ago

If you want to know user`s timezone, you can ask their about location directly — https://core.telegram.org/bots/api/#location And then calculate UTC with another services.