Page 1 of 1
Date 30/12/1899 - Delphi 7 + Postgresql + Zeos 7.2.10
Posted: 07.06.2021, 22:04
by fabiomauriciof
Hi
I updated zeos to version 7.2.10 and after that it started to present in dbgrig the date 12/30/1899. I do a simple query at the bank and everything is recorded right there. Has anyone been through this and can you please help?
Here are the attachments
Thanks
Fabio
Re: Date 30/12/1899 - Delphi 7 + Postgresql + Zeos 7.2.10
Posted: 08.06.2021, 13:12
by marsupilami
Hello Fabio,
we didn't see that kind of behaviour (yet). Which version of PostgreSQL do you use? Could you please create a sample application that shows the error and a small sql script that prepares a database (table + table data) for the sample app? This really would help in tacking down the problem.
Also - could you please try what happens if you use the latest 7.2 version from our subversion? If you prefer git, then there is a git repo at
http://github.com/marsupilami79/zeoslib
Best regards,
Jan
Re: Date 30/12/1899 - Delphi 7 + Postgresql + Zeos 7.2.10
Posted: 08.06.2021, 16:31
by fabiomauriciof
Hi.
Yes, I will provide the test script and program and post it for review.
As soon as I can do the test with the latest 7.2 I will post the result..
Thanks
Re: Date 30/12/1899 - Delphi 7 + Postgresql + Zeos 7.2.10
Posted: 09.06.2021, 14:21
by fabiomauriciof
Hi.
Yesterday when preparing the test program to send for validation I verified that the date was correct! When I went to compare the banks I verified that the bank encoding was as LATIN1 and in the test it was as UTF8 which is the default. That way I will make the correction in the database encoding and everything is fine with Zeusdb.
Sorry for the inconvenience and thank you because otherwise I would not have identified the problem.
Fabio
Re: Date 30/12/1899 - Delphi 7 + Postgresql + Zeos 7.2.10
Posted: 09.06.2021, 18:33
by fabiomauriciof
Complementing the information...
I always used the following configuration to set the bank:
ALTER DATABASE database SET DateStyle TO ISO,YMD;
In order for Zeusdb to work I had to switch to:
ALTER DATABASE database SET DateStyle TO ISO,YMD;
Was this really expected? Doesn't work with parameter the other way?
Thanks
Fabio
Re: Date 30/12/1899 - Delphi 7 + Postgresql + Zeos 7.2.10
Posted: 09.06.2021, 20:31
by marsupilami
Hello Fabio,
Zeos 7.2.4 introduced new parameters for handling date and time reading and writing. See the release notes, section "Date and Time format settings":
Zeos now supports specifying date and time format settings that will be used if Zeos doesn’t know how to correctly format date and time settings for the DBMS to understand them.
[...]
These settings can be used to solve problems on the following drivers:
I think that should solve the problem.
Best regards,
Jan