Subject | Timestamp difference Windows / Linux |
---|---|
Author | Roy Damman |
Post date | 2008-08-18T09:24:38Z |
Hello,
I have a problem when running my Firebird server under Linux. This
concerns inserting / updating records with a column value for a
timestamp field with the value NOW. When inserting / updating records
the server uses the current date/time of the server. Running Firebird
under Windows the timestamp has a resolution of 1 second but under Linux
the timestamp seems to have a resolution of 1/10000 second. But when
using the isc_decode_timestamp to decode this timestamp from the server,
the high resolution part gets lost. This is problematic when updating
records using a "last changed" timestamp. If you compare your read
version of the timestamp (1 sec resolution) with the value in the
database (1/10000 second resolution), the result will be (almost) always
false. So the big question is: Is there a high resolution
isc_decode_timestamp available or does someone have another solution?
Thanks,
Roy Damman
I have a problem when running my Firebird server under Linux. This
concerns inserting / updating records with a column value for a
timestamp field with the value NOW. When inserting / updating records
the server uses the current date/time of the server. Running Firebird
under Windows the timestamp has a resolution of 1 second but under Linux
the timestamp seems to have a resolution of 1/10000 second. But when
using the isc_decode_timestamp to decode this timestamp from the server,
the high resolution part gets lost. This is problematic when updating
records using a "last changed" timestamp. If you compare your read
version of the timestamp (1 sec resolution) with the value in the
database (1/10000 second resolution), the result will be (almost) always
false. So the big question is: Is there a high resolution
isc_decode_timestamp available or does someone have another solution?
Thanks,
Roy Damman