Skip to content

Commit 7eda3d8

Browse files
authored
Fix object replication policy datetime parsing (#24587)
1 parent a1b6b92 commit 7eda3d8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Storage/Storage.Management/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21-
21+
* Fixed object replication policy time format parsing issue [#24434]
22+
2223
## Version 6.1.3
2324
* Introduced secrets detection feature to safeguard sensitive data.
2425
* Upgraded Azure.Core to 1.37.0.

src/Storage/Storage.Management/Models/PSObjectReplicationPolicy.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.WindowsAzure.Commands.Common.Attributes;
1717
using System;
1818
using System.Collections.Generic;
19+
using System.Globalization;
1920

2021
namespace Microsoft.Azure.Commands.Management.Storage.Models
2122
{
@@ -178,7 +179,7 @@ public PSObjectReplicationPolicyFilter(ObjectReplicationPolicyFilter filter)
178179
{
179180
filter.MinCreationTime = filter.MinCreationTime + "Z";
180181
}
181-
this.MinCreationTime = Convert.ToDateTime(filter.MinCreationTime);
182+
this.MinCreationTime = Convert.ToDateTime(filter.MinCreationTime, CultureInfo.GetCultureInfo("en-US"));
182183
}
183184
}
184185
}

0 commit comments

Comments
 (0)