Skip to content

Fix market hours calculation to use Eastern Time for accurate trading…#29

Open
miguelSoldado1 wants to merge 1 commit intoygwyg:mainfrom
miguelSoldado1:fix/market-hours-eastern-time
Open

Fix market hours calculation to use Eastern Time for accurate trading…#29
miguelSoldado1 wants to merge 1 commit intoygwyg:mainfrom
miguelSoldado1:fix/market-hours-eastern-time

Conversation

@miguelSoldado1
Copy link

Fix market open/close markers to use Eastern Time

Market hour markers (open at 9:30 AM, close at 4:00 PM) were using the user's local timezone instead of Eastern Time where US markets actually operate. This caused markers to appear at incorrect times for users outside of ET.

Now uses Intl.DateTimeFormat with America/New_York timezone to correctly identify market hours regardless of user location. Also handles EST/EDT transitions automatically.

Note: The alpaca clock PR didn't fix the markers for me at least, added Intl.DateTimeFormat again but with cleaner diff

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

1 participant