Spaces:
Sleeping
Sleeping
Update cwa_service.py
Browse files- cwa_service.py +3 -1
cwa_service.py
CHANGED
|
@@ -93,7 +93,9 @@ def _parse_significant_earthquakes(obj: dict) -> pd.DataFrame:
|
|
| 93 |
|
| 94 |
df = pd.DataFrame(rows)
|
| 95 |
if not df.empty and "Time" in df.columns:
|
| 96 |
-
df["Time"] = pd.to_datetime(df["Time"], errors="coerce", utc=True).dt.tz_convert(TAIPEI_TZ)
|
|
|
|
|
|
|
| 97 |
return df
|
| 98 |
|
| 99 |
def fetch_significant_earthquakes(days: int = 7, limit: int = 5) -> str:
|
|
|
|
| 93 |
|
| 94 |
df = pd.DataFrame(rows)
|
| 95 |
if not df.empty and "Time" in df.columns:
|
| 96 |
+
# df["Time"] = pd.to_datetime(df["Time"], errors="coerce", utc=True).dt.tz_convert(TAIPEI_TZ)
|
| 97 |
+
# 鍋囪ō TAIPEI_TZ 宸插湪妾旀闁嬮牠瀹氱京
|
| 98 |
+
df["Time"] = pd.to_datetime(df["Time"], errors="coerce").dt.tz_localize(TAIPEI_TZ)
|
| 99 |
return df
|
| 100 |
|
| 101 |
def fetch_significant_earthquakes(days: int = 7, limit: int = 5) -> str:
|