Skip to content

Commit

Permalink
Fix object replication policy datetime parsing (#24587)
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanz7 committed Apr 9, 2024
1 parent a1b6b92 commit 7eda3d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Storage/Storage.Management/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
- Additional information about change #1
-->
## Upcoming Release

* Fixed object replication policy time format parsing issue [#24434]

## Version 6.1.3
* Introduced secrets detection feature to safeguard sensitive data.
* Upgraded Azure.Core to 1.37.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Microsoft.WindowsAzure.Commands.Common.Attributes;
using System;
using System.Collections.Generic;
using System.Globalization;

namespace Microsoft.Azure.Commands.Management.Storage.Models
{
Expand Down Expand Up @@ -178,7 +179,7 @@ public PSObjectReplicationPolicyFilter(ObjectReplicationPolicyFilter filter)
{
filter.MinCreationTime = filter.MinCreationTime + "Z";
}
this.MinCreationTime = Convert.ToDateTime(filter.MinCreationTime);
this.MinCreationTime = Convert.ToDateTime(filter.MinCreationTime, CultureInfo.GetCultureInfo("en-US"));
}
}
}
Expand Down

0 comments on commit 7eda3d8

Please sign in to comment.