From: Ivan B. <iv...@cv...> - 2010-10-28 20:31:46
|
On 10/28/2010 06:37 PM, Andreas Piesk wrote: > Hello list, > > the result window displays date in format 'YYYY:MM:DD HH24:MI:SS' and ignores the format specified > in preferences. the date format is hardcoded in trotl in BindParDate::get_string(): > > diff -Purp tora.org/src/trotl/src/trotl_date.cpp tora/src/trotl/src/trotl_date.cpp > --- tora.org/src/trotl/src/trotl_date.cpp 2010-07-09 19:18:57.000000000 +0200 > +++ tora/src/trotl/src/trotl_date.cpp 2010-10-28 16:12:12.421885723 +0200 > @@ -46,6 +46,7 @@ > #endif > > #include "trotl_date.h" > +#include "../../toconf.h" > > namespace trotl { > > @@ -66,7 +67,7 @@ tstring BindParDate::get_string(unsigned > text str_buf[200]; > ub4 str_len = sizeof(str_buf) / sizeof( *str_buf); > > - const char fmt[] = "YYYY:MM:DD HH24:MI:SS"; > + const char fmt[] = DEFAULT_DATE_FORMAT; > const char lang_fmt[] = "American"; > > sword res = OCICALL(OCIDateToText(_env._errh, > > I've no idea how to fix that (using the format from preferences). Who can help? > > regards, > -ap > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > It is up to me to fix it. There is format string for numbers defined in trotl_stat.cpp. char TROTL_EXPORT *g_TROTL_DEFAULT_NUM_FTM = "TM\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; I'm going to add one more line here for date format. Then while initializing the connection provider I'll copy format string from configuration onto a pointer ::trotl::g_TROTL_DEFAULT_DATE_FMT. The question is whether we should have also config option for string format. At this moment I convert OCINumber into integer if it fits in it. Large number's (bigger that 32bit/64bit integer) are converted into a QString using format "TM". Ivan |