Skip to content

Submit-Renewal - Date casting error #578

@Freeben666

Description

@Freeben666

Hello,

I'm having some trouble with Posh-ACME when trying to renew a certificate:
image

MethodInvocationException: C:\Users\XXXXXX\Documents\PowerShell\Modules\Posh-ACME\4.25.1\Private\Update-PAOrder.ps1:94
Line |
  94 |  …         if ((Get-DateTimeOffsetNow) -gt [DateTimeOffset]::Parse($rene …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "Parse" with "1" argument(s): "String '12/27/2024 09:45:40' was not recognized as a valid DateTime."
MethodInvocationException: C:\Users\XXXXXX\Documents\PowerShell\Modules\Posh-ACME\4.25.1\Public\Submit-Renewal.ps1:51
Line |
  51 |  …         if (-not $Force -and $null -ne $order.RenewAfter -and (Get-Da …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "Parse" with "1" argument(s): "String '12/27/2024 09:45:40' was not recognized as a valid DateTime."
MethodInvocationException: C:\Users\XXXXXX\Documents\PowerShell\Modules\Posh-ACME\4.25.1\Private\Update-PAOrder.ps1:94
Line |
  94 |  …         if ((Get-DateTimeOffsetNow) -gt [DateTimeOffset]::Parse($rene …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "Parse" with "1" argument(s): "String '12/27/2024 09:45:40' was not recognized as a valid DateTime."
WARNING: This certificate order has already been completed. Use -Force to overwrite the current certificate.

Could that be related to regional settings?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions