Skip to content

Commit

Permalink
[Bug] time search update
Browse files Browse the repository at this point in the history
  • Loading branch information
cecy07 authored Aug 1, 2024
1 parent 35c310c commit ea3b169
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,19 @@ def check_login():

col1, col2 = st.columns(2)
date = col1.date_input("Date", value=st.session_state.cur_date)
time = col2.time_input("Time", value=st.session_state.cur_time)
time = col2.time_input("Time", value=st.session_state.cur_time, step=3600)
st.session_state.cur_date = date
st.session_state.cur_time = time
date = date.strftime("%Y%m%d")
time_selected = time.strftime("%H%M%S")
#time = time.strftime("%H%M%S")
time = "000000"
time = time.strftime("%H%M%S")
time_obj = datetime.datetime.strptime(time, "%H%M%S")
# Subtract one hour
time_obj -= datetime.timedelta(hours=1)
# Convert the datetime object back to a string
new_time_str = time_obj.strftime("%H%M%S")
time = new_time_str
#time = "000000"

table_stations = Stations(mode, language_sched)
if st.button(_("Search")):
Expand Down

0 comments on commit ea3b169

Please sign in to comment.