There is an error when getting DateTime record in FirebirdDataLayer.
Code:
Code: Select all
wxDateTime FirebirdResultSet::GetResultDate(const wxString& strField)
{
....
if (nType == SQL_TIMESTAMP)
{
struct tm timeInTm;
isc_decode_timestamp((ISC_TIMESTAMP *)pVar->sqldata, &timeInTm);
//dateReturn.Set(timeInTm);
dateReturn.Set(timeInTm.tm_mday, wxDateTime::Month(timeInTm.tm_mon), timeInTm.tm_year, timeInTm.tm_hour, timeInTm.tm_min, timeInTm.tm_sec);
}
....
}
dateReturn.Set(timeInTm.tm_mday, wxDateTime::Month(timeInTm.tm_mon), timeInTm.tm_year, timeInTm.tm_hour, timeInTm.tm_min, timeInTm.tm_sec);
don't set the year correct (instead of 2006 I get 0106), but when I use dateReturn.Set(timeInTm) it works fine.
I tested it under Windows. I'll check it on linux when I come home.
Bye[/code]