diff --git a/src/Websites/Websites/ChangeLog.md b/src/Websites/Websites/ChangeLog.md index f6074198074e..9f7a68670611 100644 --- a/src/Websites/Websites/ChangeLog.md +++ b/src/Websites/Websites/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Fixed DateTime conversion issue caused by culture ## Version 2.10.0 * Updated `New-AzAppServicePlan` to create an app service plan with host environment id #16094 diff --git a/src/Websites/Websites/Cmdlets/BackupRestore/GetAzureWebAppSnapshot.cs b/src/Websites/Websites/Cmdlets/BackupRestore/GetAzureWebAppSnapshot.cs index 989140f2c4ee..8b2d2d907002 100644 --- a/src/Websites/Websites/Cmdlets/BackupRestore/GetAzureWebAppSnapshot.cs +++ b/src/Websites/Websites/Cmdlets/BackupRestore/GetAzureWebAppSnapshot.cs @@ -15,6 +15,7 @@ using System; using System.Linq; using System.Management.Automation; +using System.Globalization; namespace Microsoft.Azure.Commands.WebApps.Cmdlets.BackupRestore { @@ -34,7 +35,7 @@ public override void ExecuteCmdlet() ResourceGroupName = this.ResourceGroupName, Name = this.Name, Slot = string.IsNullOrEmpty(this.Slot) ? "Production" : this.Slot, - SnapshotTime = DateTime.Parse(s.Time) + SnapshotTime = DateTime.Parse(s.Time, CultureInfo.InvariantCulture) }; }).OrderByDescending(s => s.SnapshotTime).ToArray(); WriteObject(list, true);