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

Object properties with type DateTime parse incoming dates incorrectly swapping month/day #137

Closed
ddemeyer opened this issue Oct 1, 2021 · 1 comment
Labels
bug ISHRemote7+ Any entry that has to do with the PowerShell (Core) and .NET (Core) enabled ISHRemote version must
Milestone

Comments

@ddemeyer
Copy link
Contributor

ddemeyer commented Oct 1, 2021

PSNoteProperty Sortable DateTime parses prefering CurrentCulture date time string interpretation over expected incoming format. Suggest to change the order in NameHelper.cs

([System.Globalization.CultureInfo]::CurrentCulture).DateTimeFormat.ShortDatePattern = "M/d/yyyy"
$tomorrow = (Get-Date).AddDays(1)
# returns Saturday, October 2, 2021 11:06:10

$bt = Add-IshBackgroundTask -EventType PUSHTRANSLATIONS -EventDescription "ISHRemote try debug" -RawInputData "123" -StartAfter $tomorrow
# API call CreateBackgroundTaskWithStartAfter parameter startAfter as 2021-10-02T13:06:10.2192937+02:00
# API call Find returns 02/10/2021 11:06:10, the default legacy format

$bt.executeafterdate
# returns 2021-02-10T11:06:10
# notice that October became February
@ddemeyer ddemeyer added this to the v0.14 milestone Oct 1, 2021
ddemeyer pushed a commit that referenced this issue Oct 1, 2021
…ones, seemingly default CultureInfo TryParse misreads our database date format, changing parsing order, from explicit to implicit
@ddemeyer
Copy link
Contributor Author

ddemeyer commented Oct 1, 2021

Issue is fixed by above commit on #115 branch, as proven by automated build... issue should be cherry-picked to v0.14 before release

@ddemeyer ddemeyer added the ISHRemote7+ Any entry that has to do with the PowerShell (Core) and .NET (Core) enabled ISHRemote version label Oct 1, 2021
@DanyloMykhalchenko DanyloMykhalchenko modified the milestones: v0.14, v0.15 Oct 21, 2021
@ddemeyer ddemeyer modified the milestones: v0.15, v1.0 Aug 9, 2022
@ddemeyer ddemeyer closed this as completed Aug 9, 2022
ddemeyer added a commit that referenced this issue Aug 12, 2022
* #102 Branch unreleased v0.15 to v1. Switched to branch 115 Continuous Integration limited to net48 only though, so latest .NET Framework and Windows PowerShell. Delayed signing is removed from public ISHRemote project as described in #80 Using https://github.com/red-gate/XmlDoc2CmdletDoc as module (not as executable. All this, hat tip to Ivo!

* Closes #137 Better date time parsing fall backs, similar to branch 115

* #102 Extended ServicePointManager.SecurityProtocol with Tls13 and because branch release/v1 is a Windows PowerShell 5.1 and .NET Framework 4.8 only we can Close #102

* #102 Package version bump, especially PowerShellStandard from 5.1.0 to 5.1.1 and several ServiceModel-related packages from 4.7.0 to 4.9.0

* #102 CI Enable Windows PowerShell 5.1 based testing to ...sdlproducts.com

* #102 Added v1.0 human readable release notes

* #102 CI Differentiate with local and Github Actions based package/assembly versioning

* #146 Package improved XmlResolverUsingCatalog/XmlOASISCatalog classes aligning with 14SP4/14.0.4 code base

* #146 Package improved XmlResolverUsingCatalog/XmlOASISCatalog classes aligning with 14SP4/14.0.4 code base with corrected /// comment usage

Co-authored-by: ddemeyer <ddemeyer@rws.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ISHRemote7+ Any entry that has to do with the PowerShell (Core) and .NET (Core) enabled ISHRemote version must
Projects
None yet
Development

No branches or pull requests

2 participants