Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Pavel Cisar
Adriano, Dne 09. 07. 20 v 17:32 Adriano dos Santos Fernandes napsal(a): I prefer to base implementations on standard + competitors + common sense. So far from the standard pieces, Firebird follow standard. From the extensions pieces, Firebird follow competitor who implement same extensions,

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Adriano dos Santos Fernandes
On 09/07/2020 12:23, Pavel Cisar wrote: > Adriano, > > Dne 09. 07. 20 v 16:39 Adriano dos Santos Fernandes napsal(a): >> >> Storage apart, it still requires conversions to TIMESTAMP, comparations, >> etc work, so a base date is anyway required. > > Conversion to TIMESTAMP without providing the exac

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Pavel Cisar
Adriano, Dne 09. 07. 20 v 16:39 Adriano dos Santos Fernandes napsal(a): Storage apart, it still requires conversions to TIMESTAMP, comparations, etc work, so a base date is anyway required. Conversion to TIMESTAMP without providing the exact date explicitly is meaningless (as anomalies are n

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Pavel Cisar
Dne 09. 07. 20 v 15:54 Adriano dos Santos Fernandes napsal(a): If OS is configured with deprecated time zone, it will return deprecated time zone name. I don't have my system configured to use deprecated time zone name. My /etc/localtime is a symlink to /usr/share/zoneinfo/Europe/Prague B

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Adriano dos Santos Fernandes
On 09/07/2020 11:30, Pavel Cisar wrote: > Mark, > > Dne 09. 07. 20 v 13:47 Mark Rotteveel napsal(a): >> >>> >>> Again, it's not correct, it's just consistent/invariant across >>> calendar. >> >> Please explain exactly which aspects are not correct according to >> you. If the goal is to produce a co

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Pavel Cisar
Mark, Dne 09. 07. 20 v 13:47 Mark Rotteveel napsal(a): Again, it's not correct, it's just consistent/invariant across calendar. Please explain exactly which aspects are not correct according to you. If the goal is to produce a consistent value at a named zone, this is the only way to do i

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Adriano dos Santos Fernandes
If OS is configured with deprecated time zone, it will return deprecated time zone name. Europe/Prague is there in Linux. $ ll /usr/share/zoneinfo/Europe/Prague -rw-r--r-- 1 root root 2329 May 7 18:04 /usr/share/zoneinfo/Europe/Prague $ lsb_release -a No LSB modules are available. Distributor ID:

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Pavel Cisar
Adriano, Obviously the problem is in impedance mismatch between ICU and other systems that use IANA timezone database (notably POSIX, can't speak for Windows). This is then moved to programming languages that typically use OS services to handle timezone information, and not ICU (which is just

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Lester Caine
On 09/07/2020 08:40, Pavel Cisar wrote: Dne 08. 07. 20 v 21:13 Mark Rotteveel napsal(a): On 08-07-2020 20:16, Pavel Cisar wrote: As I said, CET is a zone that has a DST rule, that means that - for example - on 2020-01-01, 12:30 CET is 11:30 UTC, while at 2020-06-02,  12:30 CET (== 12:30 CEST

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Mark Rotteveel
On 2020-07-09 09:10, Pavel Cisar wrote: MArk, Dne 08. 07. 20 v 20:51 Mark Rotteveel napsal(a): Says who? Why 2020-01-01 and not other date? Because Firebird uses it does not make it right, it just make it consistent with Firebird. Also mind that DTS is just one from possible time shifts for

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Adriano dos Santos Fernandes
On 09/07/2020 04:40, Pavel Cisar wrote: > > Please, read some documentation about the problem in general, not only > documentation for libraries you (or Firebird) use to get unbiased view. > Given the history of Python (2.7 vs 3) I would think it's quite the contrary, you should point why Python is

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Pavel Cisar
Dne 08. 07. 20 v 21:13 Mark Rotteveel napsal(a): On 08-07-2020 20:16, Pavel Cisar wrote: As I said, CET is a zone that has a DST rule, that means that - for example - on 2020-01-01, 12:30 CET is 11:30 UTC, while at 2020-06-02,  12:30 CET (== 12:30 CEST) is 10:30 UTC. CET is NOT a zone with

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-09 Thread Pavel Cisar
MArk, Dne 08. 07. 20 v 20:51 Mark Rotteveel napsal(a): Says who? Why 2020-01-01 and not other date? Because Firebird uses it does not make it right, it just make it consistent with Firebird. Also mind that DTS is just one from possible time shifts for timezone. Yes, Firebird says so. Firebird

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Mark Rotteveel
On 08-07-2020 20:16, Pavel Cisar wrote: As I said, CET is a zone that has a DST rule, that means that - for example - on 2020-01-01, 12:30 CET is 11:30 UTC, while at 2020-06-02,  12:30 CET (== 12:30 CEST) is 10:30 UTC. CET is NOT a zone with DTS rule, CET (Central European Time) is 1 hour ahe

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Mark Rotteveel
On 08-07-2020 20:16, Pavel Cisar wrote: Mark, I use iUtil Dne 08. 07. 20 v 17:44 Mark Rotteveel napsal(a): The thing is, TIME WITH TIME ZONE for named time zone should be considered at 2020-01-01, so the relevant DST rule for that date is in effect. Says who? Why 2020-01-01 and not other

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Pavel Cisar
Mark, I use iUtil Dne 08. 07. 20 v 17:44 Mark Rotteveel napsal(a): The thing is, TIME WITH TIME ZONE for named time zone should be considered at 2020-01-01, so the relevant DST rule for that date is in effect. Says who? Why 2020-01-01 and not other date? Because Firebird uses it does not m

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Mark Rotteveel
On 08-07-2020 16:54, Pavel Cisar wrote: Dne 08. 07. 20 v 15:32 Mark Rotteveel napsal(a): The problem is how this is handled in Python standard library. It does define only abstract base class for timezone handling (https://docs.python.org/3.8/library/datetime.html#tzinfo-objects). There are two i

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Tony Whyman
On 08/07/2020 14:00, Pavel Cisar wrote: TIME WITH TIMEZONE is pointless. It sort off works for "naive" TZ that does not have things like summer time and other time shifts based on date. The pytz library does not even allow you to create time with such tz. The dateutil does, but the usability is

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Pavel Cisar
Dne 08. 07. 20 v 15:32 Mark Rotteveel napsal(a): TIME WITH TIMEZONE is pointless. It sort off works for "naive" TZ that does not have things like summer time and other time shifts based on date. The pytz library does not even allow you to create time with such tz. The dateutil does, but the u

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Adriano dos Santos Fernandes
On 08/07/2020 10:44, Dimitry Sibiryakov wrote: > 08.07.2020 15:32, Adriano dos Santos Fernandes wrote: >> I personally think TIME-TZ with regions are a valid thing (albeit weird >> depending on the operations) because it fills a gap where one creates a >> TIME and a additional region column. TIME-T

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Lester Caine
On 08/07/2020 14:44, Dimitry Sibiryakov wrote: 08.07.2020 15:32, Adriano dos Santos Fernandes wrote: I personally think TIME-TZ with regions are a valid thing (albeit weird depending on the operations) because it fills a gap where one creates a TIME and a additional region column. TIME-TZ with o

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Dimitry Sibiryakov
08.07.2020 15:32, Adriano dos Santos Fernandes wrote: I personally think TIME-TZ with regions are a valid thing (albeit weird depending on the operations) because it fills a gap where one creates a TIME and a additional region column. TIME-TZ with offsets only (no regions) does not have the weird

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Mark Rotteveel
On 08-07-2020 15:00, Pavel Cisar wrote: I'm trying to implement support for FB 4 TIME/TIMESTAMP WITH TIMEZONE in new Python driver, and I'm constantly hitting a stone wall with it. The TZ support in standard datetime Python module is nice, smart and flexible, but builtin support does not suppo

Re: [Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Adriano dos Santos Fernandes
On 08/07/2020 10:00, Pavel Cisar wrote: > Hi all, > > I'm trying to implement support for FB 4 TIME/TIMESTAMP WITH TIMEZONE > in new Python driver, and I'm constantly hitting a stone wall with it. > > The TZ support in standard datetime Python module is nice, smart and > flexible, but builtin suppo

[Firebird-devel] Crazy about time/timestamp with timezone

2020-07-08 Thread Pavel Cisar
Hi all, I'm trying to implement support for FB 4 TIME/TIMESTAMP WITH TIMEZONE in new Python driver, and I'm constantly hitting a stone wall with it. The TZ support in standard datetime Python module is nice, smart and flexible, but builtin support does not supports complex TZ with time shift