xArchive throws Exception setting "LastWriteTime"
I am trying to unzip logstash archive and I am getting following error on first file:
Exception setting "LastWriteTime": "Cannot convert value "24.02.2017 17 :47:52" to type "System.DateTime". Error: "String was not recognized as a valid DateTime.""
https://artifacts.elastic.co/downloads/logstash/logstash-5.2.2.zip
@rseniuta What version of xPSDesiredStateConfiguration/PSDscResources are you using? Did you download from Github or the PowerShell Gallery? This resource is getting released with a huge update tomorrow that may have already fixed this problem. You can see the changes in #319
I am using latest version from github.
@rseniuta Seems like a culture issue. I tried upzipping that same file on my test machine. I actually got a different error, but once that was fixed, I didn't see the same error you were getting. That is on an en-US culture machine.
Though I do see the same error if I call Get-Date "24.02.2017 17:47:52" on my en-US machine.
Same issue exists in PSDscResources, should I raise on that repo too?
I haven't looked at this in depth but is there perhaps a culture invariant format? A quick google search reveled this. http://blogs.microsoft.co.il/scriptfanatic/2011/04/14/converting-date-strings-in-powershell/
Having to revert back to the in-built archive resource now.
@andy1547 If this a problem in PSDscResources resource module, then go ahead and raise the issue there as well