mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
Resolve Python Datetime warnings (#7119)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
from datetime import (
|
||||
date as dateType,
|
||||
datetime,
|
||||
timezone,
|
||||
)
|
||||
from typing import Any, Dict, List, Optional
|
||||
from warnings import warn
|
||||
@@ -93,8 +94,8 @@ class YFinanceShareStatisticsData(ShareStatisticsData):
|
||||
)
|
||||
@classmethod
|
||||
def validate_first_trade_date(cls, v):
|
||||
"""Convert dates from UTC timestamp."""
|
||||
return datetime.utcfromtimestamp(v).date() if v else None
|
||||
"""Convert dates from UTC timestamp."""
|
||||
return datetime.fromtimestamp(v, timezone.utc).date() if v else None
|
||||
|
||||
|
||||
class YFinanceShareStatisticsFetcher(
|
||||
|
||||
Reference in New Issue
Block a user