Firebird 4 - Timestamp with time zone

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
leonardt.neugebauer
Posts: 32
Joined: Wed 27 May 2020 06:22

Firebird 4 - Timestamp with time zone

Post by leonardt.neugebauer » Wed 15 Sep 2021 09:38

How can I address a TIMESTAMP WITH TIME ZONE as TDateTime in Delphi?

The field in the query is a TWideStringField and cannot be addressed with AsDateTime.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Firebird 4 - Timestamp with time zone

Post by ViktorV » Wed 15 Sep 2021 17:40

Hi Leo!

Thank you for your question!

In UniDAC 9.0.1 for Firebird 4, we supported INT128, DECFLOAT and large NUMERIC types, as well as table names up to 64 characters.
The TIMESTAMP WITH TIME ZONE type is supported as a string in this release. Full support of this type will be in the next release of UniDAC.
Should you have any questions, feel free to ask!

Best regards,
Viktor

leonardt.neugebauer
Posts: 32
Joined: Wed 27 May 2020 06:22

Re: Firebird 4 - Timestamp with time zone

Post by leonardt.neugebauer » Fri 10 Dec 2021 07:17

Did I understand right that TIMESTAMP WITH TIME ZONE is not supported in 9.1.1?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Firebird 4 - Timestamp with time zone

Post by ViktorV » Fri 10 Dec 2021 12:49

Hi Leo!

Yes, unfortunately it is not.

Kindly note that in UniDAC 9.1.1 fields of type dtFloat are created for system types INT128, DECFLOAT, and large NUMERIC by defaul, instead of the line as it was in 9.0.1.
The TIMESTAMP WITH TIME ZONE type is supported as a string in this release as well as in the previous one.

We will try to add full support for TIMESTAMP WITH TIME ZONE type in the new release and set it to the highest priority.
As soon as we add this support, we will immediately inform you so that you can check it on your side before the official version with this support is released.

Should you have any questions, do not hesitate to ask!

leonardt.neugebauer
Posts: 32
Joined: Wed 27 May 2020 06:22

Re: Firebird 4 - Timestamp with time zone

Post by leonardt.neugebauer » Fri 16 Sep 2022 06:01

Are the works for the new data types of Firebird 4 now completed?

Are there any descriptions of what exactly has changed or been added?
If possible, also examples of how to handle TIMEZONES and how to use them.

leonardt.neugebauer
Posts: 32
Joined: Wed 27 May 2020 06:22

Re: Firebird 4 - Timestamp with time zone

Post by leonardt.neugebauer » Fri 16 Sep 2022 06:11

Has anything changed with the types, are they still all represented as strings as well?
https://blog.devart.com/delphi-dac-for-firebird-4.html

pavelpd
Devart Team
Posts: 109
Joined: Thu 06 Jan 2022 14:16

Re: Firebird 4 - Timestamp with time zone

Post by pavelpd » Tue 27 Sep 2022 12:22

Hey,

Please note that in the latest released version of UniDAC 9.3.0 we have improved support for two data types TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE.
From this version, fields with type TIMESTAMP WITH TIME ZONE(TIME WITH TIME ZONE) are defined by default as type TDateTimeField(TTimeField).

Kindly note that in UniDAC, when working with data of TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE types, the conversion is performed to the local time configured on your computer, and when writing data, the conversion is not performed and the time is entered into the database in the local format configured on the computer.

1) By default, the TIBCConnection.EnableIBCTimeStampTZ property is enabled and fields of type TIMESTAMP WITH TIME ZONE(TIME WITH TIME ZONE) will be represented as type TIBCTimeStampTZField(TIBCTimeTZField).
These types are added directly to work with fields like TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE, with which you can extract the necessary information, such as the time zone, write data in the format you need (get or set the value as TSQLTimeStampOffset, etc.) .

2) If the TIBCConnection.EnableIBCTimeStampTZ property is disabled, fields of the TIMESTAMP WITH TIME ZONE(TIME WITH TIME ZONE) type will be represented in the same way as in UniDAC, as a regular TDateTimeField(TTimeField) type, which is limited in functionality compared to the TIBCTimeStampTZField(TIBCTimeTZField) type ).

We'll be adding information about this type to our documentation soon.
Once the documentation is updated we will let you know.

For now, you can update to the latest version of UniDAC and test the added support for the TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE data types.

Post Reply