Reports not working

I installed leantime few days ago using docker image and a non dockerized nginx to reverse proxy for ssl purposes.
I’ve changed language from english us to english gb because i’m not used to mm/dd/yyyy date format.
The problem is that the report throw a 500 error.
If i set english us again, the report appears but the info is 2 days outdated.
In spanish same error as english gb.
How can i solve this error?
I don’t know if the reports worked before the change because i tested it for the first time with a full project today.

Thank you!

Hi, thanks for reporting. I will take a look at the bug and get back.

I am planning to cut a release today or tomorrow.

Do you see any errors in resources/logs/error.log?

I have the same problem with this questions. This is what I found.

What I did:
I manually change the date format to ‘d-m-Y’ in the language file. (Leantime 2.1.4)

What happen:
The problem is when I open ‘Reports’ menu. Leantime returns error 500.

Error from my log file:
PHP Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (20/01/2021) at position 0 (1): Unexpected character in <leantime_dir>/src/domain/sprints/services/class.sprints.php:177

What I found:
After a quick search I think I found the cause of the problem from hjpotter92’s top voted answer here.

Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash ( / ), then the American m/d/y is assumed; whereas if the separator is a dash ( - ) or a dot ( . ), then the European d-m-y format is assumed.

Workaround (TL;DR)
If you still want to use the date > month > year format. You can use dash (-) instead of slash (/) so date format will be ‘d-m-Y’. I tried this and leantime working fine with this approach.

Thanks for reporting a solution. Seems we’ll need to take another look at that as well and see how to optimize the date conversion.