Q:

Historical time to GMT\UTC with DST

Similar to:
Convert historical time to GMT
This time my scenario is:
I need to convert some string times in the format "2011061411322100" into GMT. The problem is that the times are coming from another PC and is a historical time. So I am not getting the times in real time so I cannot simply get the GMT from the local time on the box that my code is running. 
The times represent Start and End times. If my code is running during a time change, the time change will bre applied on the remote box where I am getting the times.  So if the change happens betwwen the start and end time, then the end time will be offset.
I assume I must first convert to tm:
// add to tm struct
tm tmTime;
tmTime.tm_hour = hour; 
tmTime.tm_min = min; 
tmTime.tm_sec = sec; 
tmTime.tm_mday = day; 
tmTime.tm_mon = (month-1); 
tmTime.tm_year = (year - 1900); 

Then convert to time_t
time_t tmInTime_t = mktime( &tmTime );

Then use gmtime:
struct tm *gmt = gmtime( &tmInTime_t );

This will still cause large delta if time change happens between start and end.  How do I fix?
Do I need to set .tm_isdst?  How do I know what to set to?

A:

You ABSOLUTELY must know what the reference timezone was on the source data. Simply saying it was local time on the source machine doesn't provide enough info.
Consider (for one example out of many): The DST rules changed in the US in 2007, and any date calculations spanning across that range must take that into account. When you start dealing with timezones across political borders things get vastly more complicated.
http://www.boost.org/doc/libs/1_47_0/doc/html/date_time.html
is an example of a robust time/date library written in C++ and works on most platforms. It will allow you to perform various 'arithmetic' operations on dates and times. It also includes support for the TZ database, which will allow you to perform operations on datetimes spanning timezone rule changes.

