Show-InstallationWelcome 'date is not in the correct format for the current culture'

Topics: Archive - Deployment Scripts, Archive - General
Dec 12, 2014 at 11:41 AM

I think this problem was encountered way back in version 3.1.3, or something. It seems to be back in v3.5.0.

I had been doing my tested initially for today 12/12/2014. It all seemed fine. Due to some delays with approval for the change to go globally it was put back to 15/12/2014.

Since re-running the deployment, with the amended date, it comes up with "Date is not in the correct format for the current culture". The culture it is trying to run on is en-GB, or Europe, depending on how you look at it. Here is the code:
Show-InstallationWelcome -CloseApps "AcroRd32=Adobe Reader,iexplore=Internet Explorer" -AllowDefer -DeferTimes 3 -MinimizeWindows $False -DeferDeadline '2014-12-15 14:00:00Z'
It seems to say:
 Can not convert value "12/15/2014 14:00:00" to type "System.DateTime".
That would be correct as our date is formatted the otherway round. I have tried changing the way it is written in the script to see if i can change the behaviour, but as it is going global i need to use the universal sorting date/time.

Has anyone run into this issue?

Dec 17, 2014 at 9:39 PM
Someone else reported a similar bug and I was able to resolve it by making a few edits to the Get-UniversalDate function. Please test the 3.6.0 beta from under the "Source Code" tab of this site to see if your issue is resolved as well.
Dec 18, 2014 at 11:30 AM
Thanks, I have tested this and it appears to be functioning correctly.

Annoyingly, though, if you want to swap culture and retest you need to roll the VM back as it doesnt appear to update. The toolkit must be hanging onto things somewhere, but for now i dont have enough spare time to thoroughly look into it. Where might it be keeping settings for the originally run culture?
Dec 18, 2014 at 12:17 PM
Did you try closing PowerShell and then opening it again after chaning the culture? The culture settings for the console are probably set when you first open it. So if you change culture, I suspect you may have to reopen the PowerShell console. Other that that, can't think of what it might other than Windows possibly requiring a reboot after a culture change.
Dec 18, 2014 at 2:51 PM
Yea i thought as much, i will give it a try as soon as i can.

Thanks for the quick response.
Jan 31, 2015 at 3:48 AM

I ran in to the same problem with version 3.5.0. I'm trying the DeferDays option, it then shows the same error as the first entry in this discussion.

mmashwani replied with solving the issue by editing the "Get-UniversalDate" feature for release 3.6.0.

While I'm not allowed to use Beta code in our production environment, I would like to know if there is a fix for release 3.5.0. And what I need to edit the "Get-UniversalDate" feature to solve my issue.

Thanks in advance.