Subject Re: AW: [Firebird-Java] Timezones
Author Lester Caine
Roman Rokytskyy wrote:
>> As far as I understand this, as long as I use setTimestamp/setDate and
>> getTimestamp/getDate I should be safe to get the same information back,
>> INDEPENDENT of any timezone in the system, java or whatever?
> It creates you an appropriate timestamp (e.g. Wednesday, 4th od November
> 2009 17:49:35.005) for your _locale_ timezone (which for one client can
> be GMT+01, for another - GMT+05). If then, you do all computations in
> your local timezone and then save time back, it will be the same.

The basic problem here has little to do with Firebird ;)
The second your client is in a different time zone there is a problem in
that you need to know how to display times for them, and the browser
'offset' does not provide daylight saving offsets.

What we decided in bitweaver ( yes I know it's PHP, but the problem is
the same ;) ) was to store everything UTC based, so that the server
simply runs UTC and NOW is always UTC based. We then display UTC time or
we display 'local time' based on the time zone the user provides as
part of their profile. Events created at one time in one local time zone
will then correctly map to the right time in another even taking into
account differences in daylight savin!

If your site is only ever accessed from the same timezone, then you can
get away not using simple UTC times, but as soon as daylight saving is
required, then the differences between the time at the client locations
needs to be managed fully?

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Firebird -