Spaces:
Runtime error
Runtime error
Fix time calculation in run_troubleshooting function: Use local current_time instead of current_time_utc for determining time_24_hours_ago.
Browse files
app.py
CHANGED
|
@@ -101,7 +101,7 @@ def run_troubleshooting():
|
|
| 101 |
current_time = datetime.datetime.now(datetime.timezone.utc)
|
| 102 |
|
| 103 |
# 24時間前のUTC
|
| 104 |
-
time_24_hours_ago =
|
| 105 |
|
| 106 |
# Filter sensor data for the last 24 hours
|
| 107 |
# Use the globally available sensor_df and filter it each time the function is called
|
|
|
|
| 101 |
current_time = datetime.datetime.now(datetime.timezone.utc)
|
| 102 |
|
| 103 |
# 24時間前のUTC
|
| 104 |
+
time_24_hours_ago = current_time - datetime.timedelta(hours=24)
|
| 105 |
|
| 106 |
# Filter sensor data for the last 24 hours
|
| 107 |
# Use the globally available sensor_df and filter it each time the function is called
|