Skip to content

Commit e3e539e

Browse files
committed
Fixes based on Azure#6062
1 parent 4c278a2 commit e3e539e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Restore/RestoreAzureRMBackupItem.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ public override void ExecuteCmdlet()
5050
Region = RecoveryPoint.Location,
5151
};
5252

53-
string azureIaaSVMRecoveryInputsCSMObjectString = JsonConvert.SerializeObject(azureIaaSVMRecoveryInputsCSMObject);
53+
string azureIaaSVMRecoveryInputsCSMObjectString = JsonConvert.SerializeObject(
54+
azureIaaSVMRecoveryInputsCSMObject,
55+
new JsonSerializerSettings { DateFormatHandling = DateFormatHandling.MicrosoftDateFormat });
5456

5557
CSMRestoreRequest csmRestoreRequest = new CSMRestoreRequest()
5658
{

src/ResourceManager/RecoveryServices/Commands.RecoveryServices/Common/PSRecoveryServicesVaultExtendedInfoClient.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ public string GetCurrentVaultChannelIntegrityKey()
150150
if (cloudException != null && cloudException.Response != null
151151
&& !string.IsNullOrEmpty(cloudException.Response.Content))
152152
{
153-
rpError.Error error = JsonConvert.DeserializeObject<rpError.Error>(cloudException.Response.Content);
153+
rpError.Error error = JsonConvert.DeserializeObject<rpError.Error>(
154+
cloudException.Response.Content,
155+
new JsonSerializerSettings { DateFormatHandling = DateFormatHandling.MicrosoftDateFormat });
154156

155157
if (error.ErrorCode.Equals(
156158
RpErrorCode.ResourceExtendedInfoNotFound.ToString(),

0 commit comments

Comments
 (0)