Timezone handling tweak.
This commit is contained in:
parent
c78154df3a
commit
dffe6f8e89
1 changed files with 1 additions and 5 deletions
|
@ -89,11 +89,7 @@ class Yahoo(BaseSource):
|
||||||
return dataclasses.replace(series, quote=quote, prices=prices)
|
return dataclasses.replace(series, quote=quote, prices=prices)
|
||||||
|
|
||||||
def _date_from_ts(self, ts, offset) -> str:
|
def _date_from_ts(self, ts, offset) -> str:
|
||||||
return (
|
return datetime.fromtimestamp(ts - offset).strftime("%Y-%m-%d")
|
||||||
datetime.fromtimestamp(ts - offset)
|
|
||||||
.replace(tzinfo=timezone.utc)
|
|
||||||
.strftime("%Y-%m-%d")
|
|
||||||
)
|
|
||||||
|
|
||||||
def _amount(self, amounts, type, i):
|
def _amount(self, amounts, type, i):
|
||||||
if type == "mid" and amounts["high"] != "null" and amounts["low"] != "null":
|
if type == "mid" and amounts["high"] != "null" and amounts["low"] != "null":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue