ATM-Consulting / dolibarr_module_bankimport

module d'import bancaire
GNU General Public License v3.0
13 stars 17 forks source link

Date wrong #50

Open MRohweder opened 2 years ago

MRohweder commented 2 years ago

On Dolibarr 14 is an problem with the imported Date Screenshot_20220801_212928 Value Date and Transaction date are 1970 after import. at import mask date shown correctly.

hanneshier commented 2 years ago

Did you found a solution for that bug?

hanneshier commented 1 year ago

Did you found a solution for that bug?

For me it was just entering the wrong date format 🤦 I was using the standard d/m/Y instead of d.m.Y

MRohweder commented 1 year ago

No thats not on my side. i use the %d.%m.%y as seen inside csv file. I can import the file and on page where i can select what kind of transaction each line is, everything works. But than i create transactions. And after that at transaction overview all date files are like this.

hanneshier commented 1 year ago

i use the %d.%m.%y as seen inside csv file.

How many digits does your year representation have? Because for four digit year representation, it has to be an uppercase Y.

There is more information in this article.

Also, I don't use their % sign, but I don't know if that makes any difference 🤷

glu000 commented 1 year ago

I have the same problem. Analysing the source-code shows that the module is using str_getcsv. This function is not working when using standard German locale settings. See https://www.php.net/manual/de/function.str-getcsv.php

By the way: As the module is using the function DateTime::createFromFormat to parse the date, you should'nt use % in the format string. So it should be d.m.Y for standard German dates

mnrbig commented 2 months ago

Hi,

This is still an issue on Dolibarr 19 and changing formats doesn't solve it. Does anyone have other ideas as to what may be causing it?

Thanks