Spaces:
Sleeping
Sleeping
change call of datetime strip
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def is_good_nap_time(datetime_str: str) -> bool:
|
|
| 21 |
True if the time is within a nap window, False otherwise.
|
| 22 |
"""
|
| 23 |
try:
|
| 24 |
-
dt = datetime.strptime(datetime_str, "%Y-%m-%d %H:%M:%S")
|
| 25 |
except ValueError:
|
| 26 |
raise ValueError(f"Invalid datetime format: '{datetime_str}'. Expected '%Y-%m-%d %H:%M:%S'.")
|
| 27 |
|
|
|
|
| 21 |
True if the time is within a nap window, False otherwise.
|
| 22 |
"""
|
| 23 |
try:
|
| 24 |
+
dt = datetime.datetime.strptime(datetime_str, "%Y-%m-%d %H:%M:%S")
|
| 25 |
except ValueError:
|
| 26 |
raise ValueError(f"Invalid datetime format: '{datetime_str}'. Expected '%Y-%m-%d %H:%M:%S'.")
|
| 27 |
|