Im using Win11 with a USB to RS232 cable to Console port of Pylontech battery…
It has both RJ11 and RJ45 cable. Using recomended RS232 cable and unit.
Then it works, I can connect then a windows update happens then not anymore.
I need to do implement see below.
It should be sufficient to just set your country to something with that date format. “South Africa” should work, as should the UK… but I have not tested either of them.
I still think it is really stupid that it parses the date from a string like that, a system-dependent string, and that after all this time it hasn’t been fixed.
I think what they are doing, most likely, is taking a string from the battery (which is likely in international format, YYYY/MM/DD hh:mm, and then they are probably using built-in win32 function to parse it, probably this one, and the parsing now becomes locale specific and breaks if it doesn’t match.
So the easiest solution is to set your locale to something that is the same as what would be used in China, or something that their testers would have used when they did the English translation, such as UK or US.
Yeah it looks like your locale adds milliseconds after the seconds component, and that may well be the problem.
I’m totally guessing here. As a programmer, I recognise this (somewhat rookie) mistake… but I cannot be 100% certain that this is what they did.
On that topic… back in 2012, on the 29th of February… a software component I maintained, but thankfully (for my reputation) didn’t write, threw an error about an invalid date. After some digging, we discovered that the code, a project for reading information from uploaded spreadsheets, had a safeguard to reject impossibly old data. Impossibly old data was defined as “older than ten years”. So how did it go about calculating that date? Oh, easy enough… split the date on the “/”, subtract 10 from the year component, and reassemble it into a new date. On that particular date, this meant it would reject any data from before 29 February 2002… with the resultant error that came with that operation.