- priority: 5 --> 8
When the Timestamp::getTime() is called during the day when the DST changes (eg: Oct, 25 2009 07:00:00) it returns an incorrect time (in the example one hour less). This is due to the fact that the actual implementation set stm.tm_hour, min and sec to zero. In this way the mktime suppose to be at the begin of the day (00:00:00) when the DST is not changed and not at 07:00:00.
We suggest to correct the implementation og Timestap::getTime in types.h with
/** Gets the time_t value of this timestamp */
virtual std::time_t getTime() const {
tm stm;
stm.tm_year=year_-1900;
stm.tm_mon=month_-1;
stm.tm_mday=day_;
stm.tm_hour=hour_;
stm.tm_min=minute_;
stm.tm_sec=second_;
stm.tm_isdst=-1; //negative means not known
return mktime(&stm);
}