Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next close #32

Merged
merged 4 commits into from
Jun 19, 2023
Merged

next close #32

merged 4 commits into from
Jun 19, 2023

Conversation

cctdaniel
Copy link
Contributor

@cctdaniel cctdaniel commented Jun 19, 2023

use ZoneInfo instead of pytz because apparently there is a conversion bug from NY->UTC with pytz showing offset as additional 4 minute which is incorrect, could use localize() but it only takes in naive datetime

https://stackoverflow.com/questions/60996205/python-datetime-timezone-conversion-off-by-4-minutes

Copy link
Contributor

@ali-bahjati ali-bahjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Can you add dt = dt.astimezone(NY_TZ) to is_market_open function too?

@cctdaniel
Copy link
Contributor Author

is_market_open

ah sorry left that out

@cctdaniel cctdaniel merged commit 944a24b into main Jun 19, 2023
@cctdaniel cctdaniel deleted the next-close branch June 19, 2023 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants