This info was shared by a user who got it from IB support. If you get a "market closed" error when connecting to the TWS, the reason might be a wrong TWS version. How to fix it:

- Open the TWS Logon Window
- Click "More Options"
- Find your 'Version';
- click 'Latest' and select 'Stable' from the drop-down
- Click 'Apply and Restart'
- When the logon window reappears, log in and the problem should be gone.