Bug: MethodInvocationException: Exception calling "Parse" with "1" argument(s): "String '5/14/2024 12:00:00 AM' was not recognized as a valid DateTime."
Describe the bug
Occured on macOS after updating PowerShell to 7.4.2.
When invoking the tiPS module the following is emitted to the error stream:
MethodInvocationException: Exception calling "Parse" with "1" argument(s): "String '5/14/2024 12:00:00 AM' was not recognized as a valid DateTime."
https://github.com/deadlydog/PowerShell.tiPS/blob/main/src/tiPS/Private/AutomaticModuleUpdateFunctions.ps1#L93
To write the date in a better format. Say .ToString('o') instead of dumping it out in whatever format the OS likes to use.
That way, when this line runs: https://github.com/deadlydog/PowerShell.tiPS/blob/main/src/tiPS/Private/AutomaticModuleUpdateFunctions.ps1#L77 it won't die horribly if the format changes.
Nice catch, and thanks for the proposed fix 🙂👍
This should not be fixed in v1.3.7. Let me know if you still have issues with that version. Thanks!