Skip to content

Commit

Permalink
#115 Debugging a CI build issue regarding client vs server timezones,…
Browse files Browse the repository at this point in the history
… seemingly default CultureInfo cannot TryParse our database format, added explicit format and fixed the yyyy typo and removed debug write-host code
  • Loading branch information
ddemeyer committed Sep 29, 2021
1 parent 48c6bb5 commit b3a3eea
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ Describe "Add-IshBackgroundTask" -Tags "Create" {
$ishBackgroundTaskStartsAfter.userid | Should -BeExactly $ishSession.UserName
# Verify returned submitted IshBackgroundTask.StartsAfter date matches provided tomorrow StartsAfter
$retrievedExecuteAfter = New-Object DateTime
Write-Host ("TODO [Must] REMOVE TryParseExact on dateTomorrow[" + $dateTomorrow + "]")
Write-Host ("TODO [Must] REMOVE TryParseExact on dateTomorrow.ToString(dd/MM/yyyy)[" + $dateTomorrow.ToString("dd/MM/yyyy") + "]")
Write-Host ("TODO [Must] REMOVE TryParseExact on ishBackgroundTaskStartsAfter.executeafterdate[" + $ishBackgroundTaskStartsAfter.executeafterdate + "]")
$conversionResult = [DateTime]::TryParseExact($ishBackgroundTaskStartsAfter.executeafterdate, "yyyy-MM-ddTHH:mm:ss", [System.Globalization.CultureInfo]::InvariantCulture, [System.Globalization.DateTimeStyles]::None, [ref]$retrievedExecuteAfter)
Write-Host ("TODO [Must] REMOVE TryParseExact raw result retrievedExecuteAfter[" + $retrievedExecuteAfter + "]")
$conversionResult | Should -BeExactly $true
$retrievedExecuteAfter.ToString("dd/MM/yyyy") | Should -BeExactly $dateTomorrow.ToString("dd/MM/yyyy")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ Describe "Get-IshBackgroundTask" -Tags "Create" {
[bool]($ishBackgroundTask.PSobject.Properties.name -match "status_task_element") | Should -Be $true
[bool]($ishBackgroundTask.PSobject.Properties.name -match "userid_task_element") | Should -Be $true
[bool]($ishBackgroundTask.PSobject.Properties.name -match "modificationdate") | Should -Be $true
Write-Host ("TODO [Must] REMOVE ishBackgroundTask.modificationdate[" + $ishBackgroundTask.modificationdate + "]")
$ishBackgroundTask.modificationdate -like "*/*" | Should -Be $false # It should be sortable date format: yyyy-MM-ddTHH:mm:ss
}
It "Parameter RequestedMetadata PipelineObjectPreference=Off" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ Describe "Get-IshEvent" -Tags "Create" {
[bool]($ishEvent.PSobject.Properties.name -match "userid") | Should -Be $true
[bool]($ishEvent.PSobject.Properties.name -match "modificationdate") | Should -Be $true
[bool]($ishEvent.PSobject.Properties.name -match "status_detail_value") | Should -Be $true
Write-Host ("TODO [Must] REMOVE ishEvent.modificationdate[" + $ishEvent.modificationdate + "]")
$ishEvent.modificationdate -like "*/*" | Should -Be $false # It should be sortable date format: yyyy-MM-ddTHH:mm:ss
}
It "Parameter RequestedMetadata PipelineObjectPreference=Off" {
Expand Down

0 comments on commit b3a3eea

Please sign in to comment.