Skip to content

Commit 79ffa79

Browse files
committed
bug fix and pm comment incorporation.
1 parent b941010 commit 79ffa79

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using System;
1818
using System.Collections.Generic;
1919
using Microsoft.Azure.Commands.RecoveryServices.Backup.Properties;
20+
using System.Globalization;
2021

2122
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Helpers
2223
{
@@ -37,14 +38,16 @@ public static List<AzureRmRecoveryServicesRecoveryPointBase> GetPSAzureRecoveryP
3738
foreach (RecoveryPointResource rp in rpList.RecoveryPointList.RecoveryPoints)
3839
{
3940
RecoveryPoint recPoint = rp.Properties as RecoveryPoint;
41+
42+
DateTime recPointTime = DateTime.ParseExact(recPoint.RecoveryPointTime, @"MM/dd/yyyy HH:mm:ss", CultureInfo.InvariantCulture).ToLocalTime();
4043
AzureRmRecoveryServicesIaasVmRecoveryPoint rpBase = new AzureRmRecoveryServicesIaasVmRecoveryPoint()
4144
{
4245
Name = rp.Name,
4346
BackupManagementType = item.BackupManagementType,
4447
ItemName = protectedItemName,
4548
ContainerName = containerUri,
4649
ContainerType = item.ContainerType,
47-
RecoveryPointTime = Convert.ToDateTime(recPoint.RecoveryPointTime).ToLocalTime(),
50+
RecoveryPointTime = recPointTime,
4851
RecoveryPointType = recPoint.RecoveryPointType,
4952
RecoveryPointId = rp.Id,
5053
WorkloadType = item.WorkloadType,

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Cmdlets/RecoveryPoint/GetAzureRMRecoveryServicesRecoveryPoint.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets
2626
{
27-
[Cmdlet(VerbsCommon.Get, "AzureRMRecoveryServicesRecoveryPoint"), OutputType(typeof(AzureRmRecoveryServicesRecoveryPointBase))]
27+
[Cmdlet(VerbsCommon.Get, "AzureRMRecoveryServicesBackupRecoveryPoint"), OutputType(typeof(AzureRmRecoveryServicesRecoveryPointBase))]
2828
public class GetAzureRMRecoveryServicesRecoveryPoint : RecoveryServicesBackupCmdletBase
2929
{
3030
internal const string DateTimeFilterParameterSet = "DateTimeFilter";

0 commit comments

Comments
 (0)