Subject Timezone again
Author Steffen Heil

After some discussion on the firebird-java list, I do understand a little
more about firebirds time formats, but a few questions are still left:

The wire protocol seems to send timestamps as a pair of integers encoded
into 8 bytes, one integer giving the number of days since some day, and one
integer giving the number of 1/10000 seconds since daystart.

1) Is this definition correct?

2) If there is no timezone definition, the allowed range for the second
value varies between 23h and 25h?

3) Is firebird in any place parsing this information? Or formatting it as
string? Where?

4) Which timezone is used in 3) ?

5) Can the timezone be fixed (per database?, per server?) ?

Right now I have the problem, that there are times that cannot be correctly
encoded in firebird:
2009.10.25 02:30:00 MESZ -> 2009.10.25 02:30:00 MEZ for example, they have
the same encoding, but are one hour different.

This happenes that the java code simply takes the numbers from above and
multiplies them by the respective factors and adds them.

What are people doing to be sure that all dates can be safed and correctly
I see only two way right now.

A) Only use servers in UTC. I don't like that idea, as there are other
services on my servers, that should not run in UTC but they handle dates
correctly anyway.

B) Don't use native data types at all, use INT64 instead. Obviously works,
but that is not the idea of a database, right?

I cannot imaging, I am the first user to have problems with this encoding,
but I cannot find much on the web...

Any hints are welcome.

Best regards,

[Non-text portions of this message have been removed]