Hello,

i'm having a problem creating dates. I use this code:

Code:
time_t temps;
struct tm * infoTemps;

time(&temps);
infoTemps=localtime(&temps);

infoTemps->tm_mday=4;
infoTemps->tm_mon=2;		
infoTemps->tm_year=109;
infoTemps->tm_hour=18;
infoTemps->tm_min=22;
infoTemps->tm_sec=0;

//printing the structure before maketime
cout << "hh:mm:ss " << infoTemps->tm_hour << ":" << infoTemps->tm_min << ":" <<infoTemps->tm_sec << endl;
cout << "dd-mm-aaaa: " << infoTemps->tm_mday << "-" << infoTemps->tm_mon+1 << "-" << infoTemps->tm_year+1900 << endl;
cout << "Dia de semana: " << infoTemps->tm_wday << endl;
cout << "Dia del año: " << infoTemps->tm_yday << endl;
cout << "Horario de verano: " << (infoTemps->tm_isdst ? "Si" : "No") << endl;

temps=mktime(infoTemps);

//printing the structure after maketime
cout << "hh:mm:ss " << infoTemps->tm_hour << ":" << infoTemps->tm_min << ":" << infoTemps->tm_sec << endl;
cout << "dd-mm-aaaa: " << infoTemps->tm_mday << "-" << infoTemps->tm_mon+1 << "-" << infoTemps->tm_year+1900 << endl;
cout << "Dia de semana: " << infoTemps->tm_wday << endl;
cout << "Dia del año: " << infoTemps->tm_yday << endl;
cout << "Horario de verano: " << (infoTemps->tm_isdst ? "Si" : "No") << endl;
The problem, is that in the first printing the correct hour is printed, 18:22. But after mktime(infoTemps) the hour change and then it become 17:22....

I think that it's caused because now is summertime and in february it isn't... but i'm not sure... and i don't know hot to make it work ok...

Is it posible to fix this problem automatically, 'cause my function have to create a lot of dates and i don't know how to make to know everytime if it's summertime or if it isn't...

Thank you very much!!!

Imanol.

p.d. Sorry my english....