01-10-2012 12:23 PM
I'm using exactly the same data to initialize 2 struct tm's, but the result given by mktime is different on each case.
Code section:
start.tm_year = sYear;
start.tm_mon = sMonth - 1;
start.tm_mday = sDay;
start.tm_hour = sHour;
start.tm_min = sMinute;
start.tm_sec = 0;
start_t = mktime(&start);
stop.tm_year = sYear;
stop.tm_mon = sMonth - 1;
stop.tm_mday = sDay;
stop.tm_hour = sHour;
stop.tm_min = sMinute;
stop.tm_sec = 0;
stop_t = mktime(&stop);
Result:
01-10-2012 02:48 PM
If I look in the manual, there is a field for daylight saving. If you did not initialize it, it can be anything. And the difference would be typical 1 hour.
Succes, Jos