Skip to content

Commit 0cb56c2

Browse files
committed
fix(IN): fix host url as well as hours scaffolding when computing daily reports
1 parent 438512a commit 0cb56c2

File tree

1 file changed

+3
-3
lines changed
  • electricitymap/contrib/parsers

1 file changed

+3
-3
lines changed

electricitymap/contrib/parsers/IN.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def fetch_grid_india_report(
385385
"""
386386

387387
GRID_INDIA_BACKEND_URL = "https://webapi.grid-india.in"
388-
GRID_INDIA_CDN_URL = "https://webcdn.grid-india.in/"
388+
GRID_INDIA_CDN_URL = "https://webcdn.grid-india.in"
389389

390390
GRID_INDIA_BACKEND_WITH_PROXY_URL = (
391391
f"{INDIA_PROXY_NO_VPC_CONNECTOR}/api/v1/file?host={GRID_INDIA_BACKEND_URL}"
@@ -608,8 +608,8 @@ def parse_daily_production_grid_india_report(
608608

609609
# Next, create a DatetimeIndex for the 24 hours of the target_datetime
610610
start_of_day = target_datetime.replace(hour=0, minute=0, second=0, microsecond=0)
611-
hourly_index = pd.date_range(start=start_of_day, periods=24, freq="H").tz_localize(
612-
IN_TZ
611+
hourly_index = pd.date_range(start=start_of_day, periods=24, freq="H").tz_convert(
612+
tz=IN_TZ
613613
)
614614

615615
# Set this as the index of your new DataFrame

0 commit comments

Comments
 (0)