--- src/db/pgSet.cpp.orig Thu Dec 4 13:23:53 2003 +++ src/db/pgSet.cpp Thu Dec 4 14:51:54 2003 @@ -200,6 +200,9 @@ { wxDateTime dt; wxString str=GetVal(col); + /* This hasn't just been used. ( Is not infinity ) */ + if ( str.IsEmpty() ) + return NULL; dt.ParseDateTime(str); return dt; } --- src/schema/pgUser.cpp.orig Thu Dec 4 15:07:23 2003 +++ src/schema/pgUser.cpp Thu Dec 4 15:53:41 2003 @@ -54,7 +54,8 @@ else sql += wxT(" NOCREATEDB"); if (GetUpdateCatalog()) sql += wxT(" CREATEUSER"); else sql += wxT(" NOCREATEUSER"); - AppendIfFilled(sql, wxT(" VALID UNTIL "), DateToStr(GetAccountExpires())); + if (GetAccountExpires().IsValid()) + AppendIfFilled(sql, wxT(" VALID UNTIL "), qtString(DateToAnsiStr(GetAccountExpires()))); sql +=wxT(";\n"); if (!configList.IsEmpty()) { --- src/utils/misc.cpp.orig Thu Dec 4 14:31:09 2003 +++ src/utils/misc.cpp Thu Dec 4 14:49:42 2003 @@ -220,6 +220,9 @@ wxDateTime StrToDateTime(const wxString &value) { wxDateTime dt; + /* This hasn't just been used. ( Is not infinity ) */ + if ( value.IsEmpty() ) + return NULL; dt.ParseDateTime(value); return dt; }