On 01/18/18 18:20, Adriano dos Santos Fernandes wrote:
Hi!

In little endian version of Sort::diddleKey:

         case SKD_timestamp:
         case SKD_sql_time:
         case SKD_sql_date:
             p[3] ^= 1 << 7;
             break;

How can this be correct for time or timestamp?

As a timestamp consists of a date and a time, and a time (alone) has the
changes in p[3], why not the p[7] is not changed for timestamp (or why
does p[3] is changed for time)?

Does it don't matter because the time part is unsigned?

In the big endian version, the bits are not changed for time (both alone
and in timestamp).

I suppose it really does not matter for unsigned time. Specially taking into an account that correct time should never have upper bit set (< 864000000)




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to