About the time_input function

I have a database with UTC time (timestamp with timezone datatype), while I want to search the data using streamlit time_input function in local time.

I have used (time_input) function to get the local time, and how can I change the time to UTC time?

my local time is UTC+8

Hi @Alvis, welcome to the Streamlit community!

The expectation is that you would use the Python datetime library to do any conversions that you would need. Once you have a timezone-aware datetime object in Python, switching time zones is a matter of calling the .astimezone() method.