Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xArchive throws Exception setting "LastWriteTime" #326

Open
rseniuta opened this issue Mar 6, 2017 · 5 comments
Open

xArchive throws Exception setting "LastWriteTime" #326

rseniuta opened this issue Mar 6, 2017 · 5 comments
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@rseniuta
Copy link

rseniuta commented Mar 6, 2017

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

@kwirkykat
Copy link
Contributor

kwirkykat commented Mar 7, 2017

@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

@rseniuta
Copy link
Author

rseniuta commented Mar 8, 2017

I am using latest version from github.

@kwirkykat kwirkykat added the bug The issue is a bug. label Mar 11, 2017
@kwirkykat kwirkykat self-assigned this Mar 11, 2017
@kwirkykat
Copy link
Contributor

@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.

@andy1547
Copy link

andy1547 commented May 4, 2017

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.

@johlju
Copy link
Member

johlju commented May 15, 2018

@andy1547 If this a problem in PSDscResources resource module, then go ahead and raise the issue there as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

4 participants