Re: Informix 4GL Bug Impacting Datetime Fields
Posted in 1996
The code which evaluates CURRENT has two separate features (bugs) which limit it to at most 3 fractional digits (milliseconds). One is that the qualifier for CURRENT is set to DATETIME YEAR TO FRACTION(3), so even if the system gives nano-second resolution (and micro-second accuracy -- see POSIX.4), you can still only get millsecond values from CURRENT. That is easy to fix, but it hasn't been done. It afflicts every system. There is a second bug which means that if the port uses ftime(), which only gives millisecond accuracy at best, the 3rd digit is placed in the 4th digit field, and this is then dropped when the value is trunated to 3 digits. Thus, it appears that the system only supports CURRENT YEAR TO FRACTION(2). This does not afflict many systems. These are both fixed in some I4GL ports, but not in the Engines ports. So, if you used dtcurrent() from ESQL/C in some (more recent) I4GL ports, you should be able to get DATETIME YEAR TO FRACTION(5) with 5 digits accuracy. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }Date: Sat, 13 Jul 1996 18:47:48 -0500 (CDT) }From: Cheryl Kendricks <cherylk@prod1.jcdc.doleta.gov> }To: Koen Van der Elst <Koen.VanderElst@ping.be> }X-Informix-List-Id: <list.10676> } }The bug is now 3 digits on my AIX 4.1.4 OS system with Informix 7.12UC2 }IBM RS6000: defined column tm_last_update datetime year to fraction(5) }It value returned in one case: }tm_last_update 1996-07-10 15:27:51.30300 } }On Sat, 13 Jul 1996, Koen Van der Elst wrote: } }> On 8 Jul 1996 08:38:25 -0400, cherylk@prod1.jcdc.doleta.gov (Cheryl }> Kendricks) wrote: }> }> >If you set the USEOSTIME=1 in your config file you could suddenly see the }> >fraction of a seconds appear. This config variable applies to 7.X engine. }> >The default is 0. In your orginal post James you did not include what }> >engine you are using. Hopes this helps! }> }> Yep this works alright. Only one minor problem : there is an Informix }> confirmed bug in Online 7.1x : fractions are limited to 2 digits. You }> can never get fraction(5).