Skip to content

Commit

Permalink
ADSRootKey: Resolved 'String was not recognized as a valid DateTime' …
Browse files Browse the repository at this point in the history
…in non-US cultures (#703)

- ADSRootKey
  -  Resolved 'String was not recognized as a valid DateTime' in non-US cultures (issue #702).
  • Loading branch information
Borgquite authored Feb 12, 2024
1 parent cb66232 commit fcc8b5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)
- Move test pipeline to Windows PowerShell. The hosted agent was updated
to PowerShell 7.4.1. That broke the ASKDSKey unit tests that has a helper
function (`Copy-ArrayObjects`) that serializes objects.
- ADSRootKey
- Resolved 'String was not recognized as a valid DateTime' in non-US cultures ([issue #702](https://github.com/dsccommunity/ActiveDirectoryDsc/issues/702)).

## [6.3.0] - 2023-08-24

Expand Down
2 changes: 1 addition & 1 deletion source/DSCResources/MSFT_ADKDSKey/MSFT_ADKDSKey.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function Get-TargetResource
elseif ($kdsRootKey)
{
$targetResource['Ensure'] = 'Present'
$targetResource['EffectiveTime'] = ([DateTime]::Parse($kdsRootKey.EffectiveTime)).ToString()
$targetResource['EffectiveTime'] = $kdsRootKey.EffectiveTime.ToString('o')
$targetResource['CreationTime'] = $kdsRootKey.CreationTime
$targetResource['KeyId'] = $kdsRootKey.KeyId
$targetResource['DistinguishedName'] = 'CN={0},CN=Master Root Keys,CN=Group Key Distribution Service,CN=Services,CN=Configuration,{1}' -f
Expand Down

0 comments on commit fcc8b5d

Please sign in to comment.