diff options
Diffstat (limited to 'python/api_quotes/quotes.py')
| -rw-r--r-- | python/api_quotes/quotes.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/api_quotes/quotes.py b/python/api_quotes/quotes.py index dc5d856c..278f1e49 100644 --- a/python/api_quotes/quotes.py +++ b/python/api_quotes/quotes.py @@ -4,6 +4,7 @@ import datetime from typing import Literal from serenitas.utils.db2 import dbconn import datetime +import pytz firmness = Literal["FIRM", "INDICATIVE"] asset_class = Literal["CD"] @@ -44,7 +45,9 @@ class Quote(Deal, table_name="markit_quotes", deal_type=None): int(d["maturityyear"]), int(d["maturitymonth"]), int(d["maturityday"]) ), "msg_id": d["message"]["id"], - "quotedate": datetime.datetime.fromtimestamp(d["receiveddatetime"] / 1000), + "quotedate": datetime.datetime.fromtimestamp( + d["receiveddatetime"] / 1000 + ).replace(tzinfo=pytz.UTC), "quotesource": d["sourceshortname"], "tenor": f"{d['tenor']}Y", } |
