Skip to content

Commit

Permalink
remove usage of arrow in IN.py (#7277)
Browse files Browse the repository at this point in the history
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
  • Loading branch information
abhidas03 and VIKTORVAV99 authored Oct 11, 2024
1 parent a58df94 commit dc81462
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions parsers/IN.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from typing import Any
from zoneinfo import ZoneInfo

import arrow
import numpy as np
import pandas as pd
from bs4 import BeautifulSoup
Expand All @@ -22,7 +21,7 @@
from parsers.lib.exceptions import ParserException

IN_TZ = ZoneInfo("Asia/Kolkata")
START_DATE_RENEWABLE_DATA = arrow.get("2020-12-17", tzinfo=IN_TZ).datetime
START_DATE_RENEWABLE_DATA = datetime(2020, 12, 17, tzinfo=IN_TZ)
CONVERSION_GWH_MW = 0.024
GENERATION_MAPPING = {
"THERMAL GENERATION": "coal",
Expand Down Expand Up @@ -498,7 +497,7 @@ def daily_to_hourly_production_data(


def get_start_of_day(dt: datetime) -> datetime:
dt_localised = arrow.get(dt).to(IN_TZ).datetime
dt_localised = dt.astimezone(IN_TZ)
dt_start = dt_localised.replace(hour=0, minute=0, second=0, microsecond=0)
return dt_start

Expand Down

0 comments on commit dc81462

Please sign in to comment.