Re: [Firebird-devel] Value of CURRENT_TIME is not current time

2020-06-02 Thread Adriano dos Santos Fernandes
On 02/06/2020 16:45, Mark Rotteveel wrote:
> On 02-06-2020 21:34, Adriano dos Santos Fernandes wrote:
>> On 02/06/2020 16:11, Mark Rotteveel wrote:
>>> Maybe it is better if CURRENT_TIME doesn't use the named zone, but
>>> instead always uses an offset based value.
>>>
>> I'm not sure it is. This would create other inconsistencies
>> (cast(current_timestamp as time with time zone) <> current_time).
>>
>> There is no problem with a time with zone, the problem is when one uses
>> it to do things that depends on a date, like you did here.
>>

Your solution does not fix any problem, as current_time is not the
singlel way to create times/tz.


>> Documentation should be improved for this case too.
> 
> This essentially means that
> 
> select * from atable where sometimecolumn > current_time;
> 
> will yield different results when the time zone is 'Europe/Amsterdam'
> than it does when the time zone is UTC. I think that is extremely
> confusing, and not acceptable.
> 

Test case showing the problem (with time/tz constant), please.


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Value of CURRENT_TIME is not current time

2020-06-02 Thread Dimitry Sibiryakov

02.06.2020 21:45, Mark Rotteveel wrote:

I think that is extremely confusing, and not acceptable.


  That's why everyone was given several years to replace CURRENT_TIME with LOCALTIME and 
don't use TIME WITH TIMEZONE at all.


--
  WBR, SD.


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Value of CURRENT_TIME is not current time

2020-06-02 Thread Mark Rotteveel

On 02-06-2020 21:34, Adriano dos Santos Fernandes wrote:

On 02/06/2020 16:11, Mark Rotteveel wrote:

Maybe it is better if CURRENT_TIME doesn't use the named zone, but
instead always uses an offset based value.


I'm not sure it is. This would create other inconsistencies
(cast(current_timestamp as time with time zone) <> current_time).

There is no problem with a time with zone, the problem is when one uses
it to do things that depends on a date, like you did here.

Documentation should be improved for this case too.


This essentially means that

select * from atable where sometimecolumn > current_time;

will yield different results when the time zone is 'Europe/Amsterdam' 
than it does when the time zone is UTC. I think that is extremely 
confusing, and not acceptable.


Mark
--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Value of CURRENT_TIME is not current time

2020-06-02 Thread Adriano dos Santos Fernandes
On 02/06/2020 16:11, Mark Rotteveel wrote:
> The recent changes to fix the derivation of TIME WITH TIME ZONE to
> 2020-01-01 has weird consequences. In summer time, the value of for
> example CURRENT_TIME is now off by 1 hour when looking at the UTC time
> value.
>
> This leads to the following confusing results:
>
> SQL> set time zone 'Europe/Amsterdam';
> SQL> select current_time at time zone 'UTC' from rdb$database;
>
>     AT
> ==
> 20:08:36. UTC
>
> SQL> set time zone 'UTC';
> SQL> select current_time at time zone 'UTC' from rdb$database;
>
>     AT
> ==
> 19:08:45. UTC
>
> SQL> select current_time from rdb$database;
>
>   CURRENT_TIME
> ==
> 19:08:52. UTC
>
> SQL>
>
> Maybe it is better if CURRENT_TIME doesn't use the named zone, but
> instead always uses an offset based value.
>
I'm not sure it is. This would create other inconsistencies
(cast(current_timestamp as time with time zone) <> current_time).

There is no problem with a time with zone, the problem is when one uses
it to do things that depends on a date, like you did here.

Documentation should be improved for this case too.


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Value of CURRENT_TIME is not current time

2020-06-02 Thread Mark Rotteveel
The recent changes to fix the derivation of TIME WITH TIME ZONE to 
2020-01-01 has weird consequences. In summer time, the value of for 
example CURRENT_TIME is now off by 1 hour when looking at the UTC time 
value.


This leads to the following confusing results:

SQL> set time zone 'Europe/Amsterdam';
SQL> select current_time at time zone 'UTC' from rdb$database;

AT
==
20:08:36. UTC

SQL> set time zone 'UTC';
SQL> select current_time at time zone 'UTC' from rdb$database;

AT
==
19:08:45. UTC

SQL> select current_time from rdb$database;

  CURRENT_TIME
==
19:08:52. UTC

SQL>

Maybe it is better if CURRENT_TIME doesn't use the named zone, but 
instead always uses an offset based value.


--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Compatibility issue

2020-06-02 Thread Alex Peshkoff via Firebird-devel

On 2020-06-02 13:19, Dimitry Sibiryakov wrote:

02.06.2020 12:14, Alex Peshkoff via Firebird-devel wrote:
This commit breaks compatibility between versions before and after 
it. Two functions were removed from Util interface. I.e. old modules 
(if any) using Util interface should be rebuilt with new firebird 
version to work with it.


  Shouldn't you remove all old versions from all public downloads in 
this case to prevent problems?




Beta1 is already removed, removing beta2 right now is not good idea.



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] Compatibility issue

2020-06-02 Thread Dimitry Sibiryakov

02.06.2020 12:14, Alex Peshkoff via Firebird-devel wrote:
This commit breaks compatibility between versions before and after it. Two functions were 
removed from Util interface. I.e. old modules (if any) using Util interface should be 
rebuilt with new firebird version to work with it.


  Shouldn't you remove all old versions from all public downloads in this case to prevent 
problems?


--
  WBR, SD.


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] Compatibility issue

2020-06-02 Thread Alex Peshkoff via Firebird-devel

Please pay attention on commit:
https://github.com/FirebirdSQL/firebird/commit/a9cef6d9aeaabc08d8f104230a38345340edf7a2

This commit breaks compatibility between versions before and after it. 
Two functions were removed from Util interface. I.e. old modules (if 
any) using Util interface should be rebuilt with new firebird version to 
work with it.







Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel