On 11/05/2018 16:04, Mark Rotteveel wrote:
> On 11-5-2018 18:31, Adriano dos Santos Fernandes wrote:
>> Hi!
>>
>> Here is the first README version for the time zone feature.
>>
>> https://github.com/FirebirdSQL/firebird/blob/work/time-zone-support/doc/sql.extensions/README.time_zone.md
>>
>
> Reading through that, a few questions:
>
> # About the 2 bytes for the time zone identifier or displacement
>
> What is the valid range for displacement? Is it -12:00 - +14:00 (see
> https://en.wikipedia.org/wiki/List_of_UTC_time_offsets) or something
> else? If so, why the +1439 in the calculation of the byte value? It
> seems to me the current possible range for the byte value is 719 -
> 2279 (-12 * 60 + 1439 = 719 to 14*60 + 1439 = 2279).
>

The accepted range when parsing a time zone string/literal is from
-14:00 to 14:00. This limit is present in the standard.


> The choice of 1439 seems to suggest an expectation of -23:59 - +23:59
> (or 0 - 2878), why?
>

I want to make all of this range reserved, as in a case it must be
increased.


> Will Firebird guarantee that the timezone identifiers will be stable
> (that is: a timezone will not get a different id in a new version or
> ICU release?), or would a driver always need to query the table with
> time zones instead of keeping its own list?
>

The ids are defined in Firebird, not in ICU, so they are stable.


> # Set time zone local
>
> What does this mean? Does it mean set to server time zone?
>
If run from the client (currently, if run anywhere), will reset to the
default time zone, which in our case is the server time zone of the
engine process.

The standard is more complex on this command. It seems each routine
creates a "stack" of the current time zone, so when set it to LOCAL it
resets to the value it was when the routine started.


> # Time zone identifiers
>
> How are ambiguities handled:
>
> For example:
> Which time zone is ACT (id 65534)? Is it Acre Time (-05:00) or
> Australian Central Time which is an alias for ACST/ACDT (+09:30 /
> +10:30)?
>
> Which time zone is IST (id 65024)? Is it India Standard Time (+5:30)
> or Irish Standard/Summer Time (+01:00) or Israel Standard Time (+02:00)
>
> And what about AST (65530), BST (65162), CST (65154), PST* (64988)?
>
> Interestingly a number of duplicates (according to
> https://www.timeanddate.com/time/zones/) are not included in the list:
> ADT, AMST, AMT, CDT, GST, PYT, WST
>
> I notice that 'summer' time zones are not present. For example, CET
> (Central European Time, +01:00) is present, but CEST (Central European
> Summer Time, +02:00) is absent. Does this mean that CET represents
> both summer and winter time?
>
> * PST is Pitcairn or Pacific, with the same offset, they are
> considered different time zones
>
ICU data is derived from TZ data hosted by IANA
(http://site.icu-project.org/tznotice).

I really can't answer questions about specific time zones, but really
grateful if we can clarify them.


Adriano


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to