This is similar to How to get the current time zone?
#include <ctime>
tzset();
time_zone_ptr zone(new posix_time_zone(tzname[localtime(0)->tm_isdst]));
The above code throws 'bad cast' exception. The time zone from tzname or GetTimeZoneInformation is a string like 'China Standard Time' which is not accepted by Boost time zone.
Is there an easy way to resolve such a basic problem?