How do I get the Olson timezone name (such as Australia/Sydney) corresponding to the value given by C\'s localtime call?
Australia/Sydney
This is the value overridden vi
The tzlocal module for Python is aimed at exactly this problem. It produces consistent results under both Linux and Windows, properly converting from Windows time zone ids to Olson using the CLDR mappings.