Re: [Firebird-devel] Time zones

2018-05-03 Thread Dimitry Sibiryakov
01.05.2018 16:19, Adriano dos Santos Fernandes wrote:   What should be used by default ? It should match functionality and default of SET DECFLOAT, i.e., be default the new behavior (describe types with TZ as types with TZ). IMHO, default should be backward-compatible behavior.

Re: [Firebird-devel] Time zones

2018-05-02 Thread Lester Caine
On 02/05/18 20:22, Adriano dos Santos Fernandes wrote: On 02/05/2018 13:16, Lester Caine wrote: On 29/04/18 21:47, Adriano dos Santos Fernandes wrote: But standard CURRENT_TIME and CURRENT_TIMESTAMP  works different than Firebird, as they returns the "WITH TIME ZONE" types. Tweaking

Re: [Firebird-devel] Time zones

2018-05-02 Thread Adriano dos Santos Fernandes
On 02/05/2018 13:16, Lester Caine wrote: > On 29/04/18 21:47, Adriano dos Santos Fernandes wrote: >> But standard CURRENT_TIME and CURRENT_TIMESTAMP  works different than >> Firebird, as they returns the "WITH TIME ZONE" types. >> >> Tweaking CURRENT_TIME/CURRENT_TIMESTAMP for compatibility is >>

Re: [Firebird-devel] Time zones

2018-05-02 Thread Dimitry Sibiryakov
02.05.2018 20:20, Adriano dos Santos Fernandes wrote:   Client library can add a timezone item into DPB if it is not provided by application, as it is done for application name now. Midware can set this value to whatever they like. Do not work that way. Web applications and middlewares

Re: [Firebird-devel] Time zones

2018-05-02 Thread Adriano dos Santos Fernandes
On 01/05/2018 11:30, Dimitry Sibiryakov wrote: > > >> There is session time zone. Session time zone is currently defined as >> default with the server time zone. >> >> We may think that's not ideal and session time zone should be defined >> with the client time zone initially. But that per se is

Re: [Firebird-devel] Time zones

2018-05-02 Thread Mark Rotteveel
On 2-5-2018 10:59, Stefan Heymann wrote: Adriano, Also there are new expressions, LOCALTIME and LOCALTIMESTAMP with functionality equivalent to the Firebird's CURRENT_TIME and CURRENT_TIMESTAMP. I'd like to suggest you name these LOCAL_TIME and LOCAL_TIMESTAMP (with the underscore in the

Re: [Firebird-devel] Time zones

2018-05-02 Thread Dmitry Yemanov
01.05.2018 13:45, Vlad Khorsun wrote: "Official" compiler for fb3 on Windows is (old) VC10. Snapshot builds of both fb3 and fb4 uses VC12 (VS2013), iirc. FB3 snapshots are built using VC10. Dmitry -- Check out the

Re: [Firebird-devel] Time zones

2018-05-02 Thread Vlad Khorsun via Firebird-devel
30.04.2018 5:50, Adriano dos Santos Fernandes wrote: Hi! Time zones branch is almost feature complete. There is two important subjects left: - ICU in Windows - as I already said, it need to be upgraded and I would like it builded as the upstream does, i.e., with full data. It would be good if

Re: [Firebird-devel] Time zones

2018-05-02 Thread Mark Rotteveel
(resending as they haven't appeared on the list yet) On 30-4-2018 04:50, Adriano dos Santos Fernandes wrote: Time zones branch is almost feature complete. There is two important subjects left: - ICU in Windows - as I already said, it need to be upgraded and I would like it builded as the

Re: [Firebird-devel] Time zones

2018-05-02 Thread Lester Caine
On 29/04/18 21:47, Adriano dos Santos Fernandes wrote: But standard CURRENT_TIME and CURRENT_TIMESTAMP works different than Firebird, as they returns the "WITH TIME ZONE" types. Tweaking CURRENT_TIME/CURRENT_TIMESTAMP for compatibility is problematic. So how do I maintain a functional system

Re: [Firebird-devel] Time zones

2018-05-02 Thread Dimitry Sibiryakov
30.04.2018 4:50, Adriano dos Santos Fernandes wrote: It was been created four new datatypes: - TIME WITH TIME ZONE - TIMESTAMP WITH TIME ZONE Do these contain time/timestamp in UTC and time zone, or time/timestamp in local time and time zone? So the first compatibility problem is when

Re: [Firebird-devel] Time zones

2018-05-02 Thread Mark Rotteveel
On 30-4-2018 04:50, Adriano dos Santos Fernandes wrote: Time zones branch is almost feature complete. There is two important subjects left: - ICU in Windows - as I already said, it need to be upgraded and I would like it builded as the upstream does, i.e., with full data. It would be good if

Re: [Firebird-devel] Time zones

2018-05-02 Thread Mark Rotteveel
On 30-4-2018 04:50, Adriano dos Santos Fernandes wrote: So before migrate to v4, users can adjust their code using Firebird 3 and once upgraded there will be no problems. I also want to repeat my opinion that I think it is a bit too late in the Firebird 4 development to include this feature

[Firebird-devel] Time zones

2018-05-02 Thread Adriano dos Santos Fernandes
Hi! Time zones branch is almost feature complete. There is two important subjects left: - ICU in Windows - as I already said, it need to be upgraded and I would like it builded as the upstream does, i.e., with full data. It would be good if someone volunter to do it as I do not have nor even

Re: [Firebird-devel] Time zones

2018-05-02 Thread fbbt
Just for thinking... Can we create dialect 4 without old and strange things from sql standard? Strange things are: - inconsistances in naming such as CURRENT_TIMESTAMP and LOCALTIMESTAMP - 'ABC' = 'ABC' -- ignored trailing spaces in varchars coparison (so we can't have 'ABC' and 'ABC

Re: [Firebird-devel] Time zones

2018-05-02 Thread Adriano dos Santos Fernandes
On 02/05/2018 05:59, Stefan Heymann wrote: > Adriano, > >> Also there are new expressions, LOCALTIME and LOCALTIMESTAMP with >> functionality equivalent to the Firebird's CURRENT_TIME and >> CURRENT_TIMESTAMP. > I'd like to suggest you name these LOCAL_TIME and LOCAL_TIMESTAMP (with > the

Re: [Firebird-devel] Time zones

2018-05-02 Thread Stefan Heymann
Adriano, > Also there are new expressions, LOCALTIME and LOCALTIMESTAMP with > functionality equivalent to the Firebird's CURRENT_TIME and > CURRENT_TIMESTAMP. I'd like to suggest you name these LOCAL_TIME and LOCAL_TIMESTAMP (with the underscore in the middle) to make them look more like their

Re: [Firebird-devel] Time zones

2018-05-01 Thread Mark Rotteveel
On 1-5-2018 16:21, Adriano dos Santos Fernandes wrote: On 01/05/2018 04:57, Mark Rotteveel wrote: (resending as they haven't appeared on the list yet) On 30-4-2018 04:50, Adriano dos Santos Fernandes wrote: So before migrate to v4, users can adjust their code using Firebird 3 and once

Re: [Firebird-devel] Time zones

2018-05-01 Thread Adriano dos Santos Fernandes
On 01/05/2018 11:19, Adriano dos Santos Fernandes wrote: > > Let's say first about TIMESTAMP. > Why this? Because TIME if more problematic. :) The standard (at least up to the 2013 drafts) does not talk about TZ regions, but only offsets. And a TIME with TZ region is problematic. Because

Re: [Firebird-devel] Time zones

2018-05-01 Thread Adriano dos Santos Fernandes
On 01/05/2018 04:57, Mark Rotteveel wrote: > (resending as they haven't appeared on the list yet) > > On 30-4-2018 04:50, Adriano dos Santos Fernandes wrote: >> So before migrate to v4, users can adjust their code using Firebird 3 >> and once upgraded there will be no problems. > > I also want

Re: [Firebird-devel] Time zones

2018-05-01 Thread Adriano dos Santos Fernandes
On 01/05/2018 07:45, Vlad Khorsun wrote: > >> - Compatibility: >> >> It was been created four new datatypes: >> - TIME WITH TIME ZONE >> - TIMESTAMP WITH TIME ZONE >> - TIME WITHOUT TIME ZONE >> - TIMESTAMP WITHOUT TIME ZONE >> >> The old types (TIME and TIMESTAMP) resolves to the "WITHOUT"

Re: [Firebird-devel] Time zones

2018-05-01 Thread Dimitry Sibiryakov
01.05.2018 12:45, Vlad Khorsun wrote:   I'd add it into 2.5.9 also, as many users will upgrade from per-v3 versions.   BTW, we could (should ?) add more such forward-compatibility features into last release of 2.5 I'm not sure if adding new features into stable branches match project's

Re: [Firebird-devel] Time zones

2018-05-01 Thread Vlad Khorsun
30.04.2018 5:50, Adriano dos Santos Fernandes wrote: Hi! Time zones branch is almost feature complete. There is two important subjects left: - ICU in Windows - as I already said, it need to be upgraded and I would like it builded as the upstream does, i.e., with full data. It would be good if

Re: [Firebird-devel] Time zones

2018-05-01 Thread Mark Rotteveel
(resending as they haven't appeared on the list yet) On 30-4-2018 04:50, Adriano dos Santos Fernandes wrote: Time zones branch is almost feature complete. There is two important subjects left: - ICU in Windows - as I already said, it need to be upgraded and I would like it builded as the

Re: [Firebird-devel] Time zones

2018-05-01 Thread Mark Rotteveel
(resending as they haven't appeared on the list yet) On 30-4-2018 04:50, Adriano dos Santos Fernandes wrote: So before migrate to v4, users can adjust their code using Firebird 3 and once upgraded there will be no problems. I also want to repeat my opinion that I think it is a bit too late in

Re: [Firebird-devel] Time zones

2018-04-30 Thread Dimitry Sibiryakov
30.04.2018 4:50, Adriano dos Santos Fernandes wrote: Time zones branch is almost feature complete. EXTRACT(TIME ZONE FROM value). Does it work? What is type of result? Subtraction and comparison of TS WITH TZ from TS WITHOUT TZ and vice versa? Changing of TZ of value? CAST? Literals?