Subject | Re: [firebird-support] Re: GMT time in Firebird |
---|---|
Author | Timothy Madden |
Post date | 2008-09-03T08:33:49Z |
On Wed, Sep 3, 2008 at 7:49 AM, Lester Caine <lester@...> wrote:
they are in. It is possible that fbclient.dll checks the time zone
upon initialization and sends it to the server as part of the protocol, if you
ask me. Just wanned to know if it does this or not.
Even if the server knows not my time zone, I would still let the server know
its time zone, whatever that is, and require all clients to convert all times
to/from GMT when communicating to the server. It is a burden to all
clients, but it is better than telling the server that it lives in
different time
zone than it really lives in.
Or better yet, I would ask all clients to convert all their times transferred
to/from server to the server's time zone, since I now find that Firebird
server does not know GMT time, so it must assume all times are in its
time zone.
The correct solution to this problem would be for the server to always
serve times in the client's time zone, transparently. So the same record
would appear to hold 2:00am to a client in GMT+2, and 3:00am to a
client living in GMT+3. It does not have to be the server who does this
conversion, as I said the clients or fbclient.dll can do that too.
Thank you,
Timothy Madden
> Adam wrote:My question was if only the client knows what time/daylight saving time
>> --- In firebird-support@yahoogroups.com, "Timothy Madden"
>> <terminatorul@...> wrote:
>>> Hello
>>>
>>> Is there a way to get or deduce GMT time from the Firebird server, I
>> mean
>>> with SQL commands ?
>>
>> Not directly. You can write / find a UDF to achieve the same thing,
>> but that is obviously harder if supporting multiple platforms.
>>
>> It is in the tracker as an enhancement request.
>> http://tracker.firebirdsql.org/browse/CORE-909
>
> The trick currently is to SET the local time on a server to UTC so that all
> the times saved are UTC. Since only the client knows what time/daylight
> saving
> zone they are in, only the client application can display the correct local
> time. SO even on the server, the DISPLAY of the time needs a UTC/Local
> switch.
>
> Actually STORING anything other than UTC is the real bug. The offset from
> UTC
> is going to change 6 months of the year in a lot of places so the current
> timestamps can give you an hours discrepancy in durations over daylight
> saving
> changes :( But then most sites are not bothered by that as a summer 9AM
> event
> is the same as a winter 9AM event ...
>
> ( and browsers only returning a time offset rather than the real time zone
> does not help the confusion :) )
>
they are in. It is possible that fbclient.dll checks the time zone
upon initialization and sends it to the server as part of the protocol, if you
ask me. Just wanned to know if it does this or not.
Even if the server knows not my time zone, I would still let the server know
its time zone, whatever that is, and require all clients to convert all times
to/from GMT when communicating to the server. It is a burden to all
clients, but it is better than telling the server that it lives in
different time
zone than it really lives in.
Or better yet, I would ask all clients to convert all their times transferred
to/from server to the server's time zone, since I now find that Firebird
server does not know GMT time, so it must assume all times are in its
time zone.
The correct solution to this problem would be for the server to always
serve times in the client's time zone, transparently. So the same record
would appear to hold 2:00am to a client in GMT+2, and 3:00am to a
client living in GMT+3. It does not have to be the server who does this
conversion, as I said the clients or fbclient.dll can do that too.
Thank you,
Timothy Madden