gkobler 38 Posted November 9, 2023 Does anyone have experience with Firebird 4, D11.3, FireDAC and the new data type "TimeStamp with Time Zone"? I would like to show the time zone in my field, have no idea to show it. Thanks in Advanced Share this post Link to post
weirdo12 19 Posted November 10, 2023 Quote Note: Firebird 4.0 client may need some ICU files if you want to work with datatypes like TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE. For further information click here. https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connect_to_Firebird_(FireDAC) Share this post Link to post
Serge_G 87 Posted November 11, 2023 Testing D12, I made small tests. First using 2 versions of Firebird (3 and 4) I made a mistake not using a TFDPhysFBDriver, default connection was using fb3 this mistake stop IDE ! FDPhysFBDriver settled I now run in another error with my French edition working with SQL To search : using FormatOptions (of the FDConnection.FDQuery or FDTable) using mappings Share this post Link to post
gkobler 38 Posted November 11, 2023 14 hours ago, weirdo12 said: Quote Note: Firebird 4.0 client may need some ICU files if you want to work with datatypes like TIMESTAMP WITH TIME ZONE and TIME WITH TIME ZONE. For further information click here. https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Connect_to_Firebird_(FireDAC) Makes not diffenrent, if the icu files there or not (same directory how the exe file). 3 hours ago, Serge_G said: FDPhysFBDriver settled I'm sure i use the new fbclient.dll from FB4. 3 hours ago, Serge_G said: working with SQL CAST is working, but for me it's just a workaround, and works with Querys not with Tables. In my opinion, when you add the fields, it will create a TSQLTimeStampField insted of a TSQLTimeStampOffsetField! The TSQLTimeStampOffsetField is what i need i think, because it has information about the timezone. But it's not possible to replace the field, you got an error But thanks for showing me a other point of view. Share this post Link to post
Dmitry Arefiev 101 Posted November 11, 2023 Support for TIMESTAMP WITH TIMEZONE and TSQLTimeStampOffsetField in FireDAC is introduced in Delphi 12. Share this post Link to post
Serge_G 87 Posted November 12, 2023 @Dmitry Arefiev My tests was with Delphi 12 first. Some links or clues ? 21 hours ago, gkobler said: CAST is working, but for me it's just a workaround, Agree, even if I rarely use FDTable 😉 Share this post Link to post
gkobler 38 Posted November 12, 2023 On 11/11/2023 at 2:13 PM, Dmitry Arefiev said: Support for TIMESTAMP WITH TIMEZONE and TSQLTimeStampOffsetField in FireDAC is introduced in Delphi 12. Didn't saw this changes on any note. But thanks, will try it next week. Share this post Link to post
gkobler 38 Posted November 13, 2023 (edited) On 11/11/2023 at 2:13 PM, Dmitry Arefiev said: Support for TIMESTAMP WITH TIMEZONE and TSQLTimeStampOffsetField in FireDAC is introduced in Delphi 12. Now i tryed the same test with D12, i can confirm that the Field are created as TSQLTimeStampOffsetField. But when i open the table now i got an exception (invalid argument could not convert the time) After that i add a GetText Methode procedure TForm1.FDTable1MONTIMESTAMPGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin text:=Format('%s UTC(%d:00',[DateTimeToStr(Sender.AsDateTime),Sender.AsSQLTimeStampOffset.TimeZoneHour]); end; It will shows the follow result?? 756 Hours? When i look to the help file, it should be -12 .. +13 Hours! Also the property TimeZoneMinuts shows me 696 Did i found a bug? Edited November 13, 2023 by gkobler Share this post Link to post
Dmitry Arefiev 101 Posted November 13, 2023 Probably ... Could you please create a new ticket at quality.embarcadero.com and provide there: 1) Simple test app reproducing the issue. 2) FireDAC environment report: http://docwiki.embarcadero.com/RADStudio/Athens/en/DBMS_Environment_Reports_(FireDAC)#Using_Delphi_Code Share this post Link to post
gkobler 38 Posted November 13, 2023 1 hour ago, Dmitry Arefiev said: Probably ... Could you please create a new ticket at quality.embarcadero.com and provide there: Done. https://quality.embarcadero.com/browse/RSP-43311 1 Share this post Link to post
Serge_G 87 Posted November 14, 2023 Same thing for me ! I tried your sample, giving me a 326 value for a GMT one Then I wrote this simple code procedure TForm1.FDQuery1MONCREATION_DATEGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin text:=sender.asString; end; Giving me an "Incorrect argument for time encoding. " error with my french version Share this post Link to post