Re: [firebird-support] Time zones

2017-01-13 Thread Stefan Heymann li...@stefanheymann.de [firebird-support]
There are requests to implement Time zones in Firebird:

http://tracker.firebirdsql.org/browse/CORE-694
http://tracker.firebirdsql.org/browse/CORE-909

These two are in the "Optional features" list for Firebird 4:
https://www.firebirdsql.org/en/planning-board/


Best Regards

Stefan



-- 
Stefan Heymann, Tübingen, Germany



Re: [firebird-support] Time zones

2017-01-12 Thread Lester Caine les...@lsces.co.uk [firebird-support]
On 12/01/17 14:09, Tim Ward t...@telensa.com [firebird-support] wrote:
> Can someone point me in the right direction please?

There have been many attempts to justify storing a time stamp complete
with timezone directly in a time field, but the real answer is that it
is always wrong. Store location data in addition to a UTC time stamp and
that way you can always display a correct time, and more importantly
correctly move a time when passing over a DST change. The one thing that
is missing from the 'offset' supplied by a browser is any means of
identifying if the offset will be the same next month. You need to know
the correct time zone and not just the current offset which is why a
time with an offset may be wrong half of the year.

Another piece of the jigsaw is the problem of identifying what the
current offset data is in relation to a timezone. If you have created a
UTC normalized time and have a timezone which gives you an offset, then
the DST rules change, you will only know of the change if you have
recorded the version of the rule set you normalised the time with, and
the current rule set. So timezone/version is the additional data that
should be recorded once working with UTC normalized times.

And if you are running a system supporting several time zones then the
server clock should always be set to UTC time. Trying to calculate UTC
then Local time from a server time that may also have DST variations
creates no end3of edge cases :) Store all times as UTC unless you are
ONLY working with one timezone, but even that is tricky if your time
zone uses DST ...

-- 
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk


Re: [firebird-support] Time zones

2017-01-12 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
12.01.2017 15:09, Tim Ward t...@telensa.com [firebird-support] wrote:
> Can someone point me in the right direction please?

   Firebird does not handle time zones at all. CURRENT_TIMESTAMP and 
CURRENT_TIME return 
local time.


-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



Re: [firebird-support] Time zones

2017-01-12 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 12-1-2017 15:09, Tim Ward t...@telensa.com [firebird-support] wrote:
> Sorry if this is a really basic question, but some time spent searching
> has failed to find for me the definitive detailed documentation on
> exactly how Firebird handles time zones (I'm particularly interested, to
> start with, in using CURRENT_TIMESTAMP to create a value in a TIMESTAMP
> field, and later reading it out and using it to display in a UI, but
> that's only to start with).
>
> Can someone point me in the right direction please?
>

Basically, Firebird doesn't really do anything with time zones, Firebird 
uses the timezone of the server for current_timestamp, current_time and 
current_date (and 'today' and 'now'). Timestamps (etc) in Firebird have 
no time zone information, so it is not possible to distinguish between 
say today 12:00 in UTC or UTC+1. This is important to realize if you 
access or write dates from systems in another time zone.

For example the JDBC specification requires that times are handled in 
the timezone of the JVM, so if Firebird server is in UTC and the JVM is 
in UTC+1 you will get discrepancies when using `current_timestamp` in 
Firebird and things like `LocalDate.now()` on the Java side.

PS In the future, could you start a new message instead of replying to 
an existing thread. In my mail client this message is grouped under the 
"FB 2.5 migrate to 3.0" thread instead of its own.

-- 
Mark Rotteveel


[firebird-support] Time zones

2017-01-12 Thread Tim Ward t...@telensa.com [firebird-support]
Sorry if this is a really basic question, but some time spent searching 
has failed to find for me the definitive detailed documentation on 
exactly how Firebird handles time zones (I'm particularly interested, to 
start with, in using CURRENT_TIMESTAMP to create a value in a TIMESTAMP 
field, and later reading it out and using it to display in a UI, but 
that's only to start with).

Can someone point me in the right direction please?

-- 
Tim Ward