nikethanreddy commited on
Commit
4ec892f
·
verified ·
1 Parent(s): 1489c23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -260,8 +260,9 @@ def get_latest_data_sequence(sequence_length: int, latitude: float, longitude: f
260
  window_end_time_dt = current_utc_time.replace(minute=0, second=0, microsecond=0)
261
 
262
  # Convert Python datetime to Pandas Timestamp for robust comparison
263
- window_start_time_ts = pd.Timestamp(window_start_time_dt, tz='UTC')
264
- window_end_time_ts = pd.Timestamp(window_end_time_dt, tz='UTC')
 
265
 
266
  # Ensure df_processed.index is timezone-aware (it should be if APIs return UTC and pd.to_datetime is used correctly)
267
  if df_processed.index.tz is None:
 
260
  window_end_time_dt = current_utc_time.replace(minute=0, second=0, microsecond=0)
261
 
262
  # Convert Python datetime to Pandas Timestamp for robust comparison
263
+ # `window_start_time_dt` and `window_end_time_dt` are already UTC-aware from `datetime.now(pytz.utc)`
264
+ window_start_time_ts = pd.Timestamp(window_start_time_dt)
265
+ window_end_time_ts = pd.Timestamp(window_end_time_dt)
266
 
267
  # Ensure df_processed.index is timezone-aware (it should be if APIs return UTC and pd.to_datetime is used correctly)
268
  if df_processed.index.tz is None: