Page 1 of 1

How to set time zone format

Posted: Mon 14 Dec 2020 14:13
by jdorlon
Hello,

I see that there is a Format property on TOraTimeStamp.

I don't see how to set the format globally for a TOraSession or even a TSmartQuery. Is this possible?

Thanks,

John Dorlon

Re: How to set time zone format

Posted: Fri 18 Dec 2020 15:49
by MaximG
Currently ODAC doesn't allow you to specify the format in TOraSession or TOraQuery. We'll try to implement such functionality. Could you send us a sample project or code fragement that we could use for testing?

Re: How to set time zone format

Posted: Mon 04 Jan 2021 22:13
by jdorlon
Well, I know I said TOraSession or TSmartQuery initially, but really, if I could just set it globally, that would work for me.

So I'd just like to do something like:
DefaultTimeZoneFormat := 'TZR'; // (I just made this variable name up)

Then this function in OraCall could be changed to:

Code: Select all

function DefaultOCITimeStampWithTZFormat(Precision: Byte = 6): string;
begin
  if DefaultTimeZoneFormat = '' then
    Result := DefaultOCITimeStampFormat + ' TZH:TZM'
  else
    Result := DefaultOCITimeStampFormat + ' ' + DefaultTimeZoneFormat;
end;
and then TZR would be used everywhere, such as query results, editing data from TDBGrid, etc.

I'm not sure if any other changes would be needed to accomplish this.

Re: How to set time zone format

Posted: Mon 11 Jan 2021 14:48
by MaximG
We'll consider implementing this behavior in the next version of our product.

Re: How to set time zone format

Posted: Tue 12 Jan 2021 15:13
by jdorlon
Thanks. Here is why it matters:

A user has inserted a timestamp with region, such as:

01.04.2021 12:00:00,0000 Europe/Berlin

Then when editing in a grid with TSmartQuery, it is shown as:

01.04.2021 12:00:00,0000 +02:00

Which is fine, but after editing, the region information is lost even if queried specifically with 'TZR'. So the user wants to set our application to use TZR instead of TZH:TZM.

Re: How to set time zone format

Posted: Tue 19 Jan 2021 14:38
by MaximG
Thank you for clarifying. We understand the value of this feature and will try to add the ability to set time zone format in a future release.

Re: How to set time zone format

Posted: Wed 23 Feb 2022 16:32
by jdorlon
Hello,

It has been more than a year since I made this request. Will you please raise the priority on this?

Thanks

John