Time slider change range on ubuntu server

Hi. I’m new in streamlit
when I use the slider for time, I define min and max values and it works locally but when I run it on the ubuntu server its values changes. however, the value that I get in the program is right but in slider, it’s not correct.
that’s my code:

cast_time = st.sidebar.slider('Cast Time:', value=datetime.time(00, 00, 00),
                              min_value=datetime.time(00, 00, 00),
                              max_value=datetime.time(22, 00, 00),

this is what is displayed:

I find out why
my local timezone is different from the server so it changes.
to avoid this problem we can set the timezone.

from dateutil import tz

ny_zone = tz.gettz('America/New_York')
cast_time = st.sidebar.slider('Cast Time:', value=datetime.time(0, 0, 0, tzinfo=ny_zone),
                              min_value=datetime.time(0, 0, 0, tzinfo=ny_zone),
                              max_value=datetime.time(22, 0, 0, tzinfo=ny_zone),