¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Change of Timezone specs in contract details?


 

What's up with timezones in TWS API contract details today? I've got all my algos messed up today on startup due to what is obviously a change of Timezone specifications. I use a custom dictionary to convert from proprietary IB timezone specifications to IANA timezones to get trading hours for my task scheduler and work within a common standard.?US stocks in the API are now in timezone named "US/Eastern". Didn't see it coming and can't figure out if it's a welcome change to some standard specification (not IANA though since that would be "America/New_York"), or to yet another proprietary format that needs to be guessed?


 

It seems that IB recently changed their format.

Too bad thay didn't seize the opportunity to go with IANA standard, but at least they are documented : they look like a mixed bag of IANA, legacy and three-letter codes.


 

Thank you! That sure is quite some hodgepodge but at least it now kind of looks like fully disclosed.


 

The time zone IDs seem to be from the tz database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

From python pytz can handle them: https://pypi.org/project/pytz/


 

Yes indeed the IDs are in the database though roughly about half of them are deprecated. Unless these get completely removed from the db this still looks like a good step towards elimination of the poorly undocumented IDs used in the API previously.