Skip to content

Commit d5720f0

Browse files
committed
Support UTC time values only as filters
1 parent 9f574e8 commit d5720f0

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

src/ResourceManager/RecoveryServices.Backup/Cmdlets/Jobs/GetAzureRmRecoveryServicesJob.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ public override void ExecuteCmdlet()
7777
rangeEnd = To.Value;
7878
}
7979

80+
if (rangeStart.Kind != DateTimeKind.Utc || rangeEnd.Kind != DateTimeKind.Utc)
81+
{
82+
throw new Exception(Resources.JobTimeFiltersShouldBeSpecifiedInUtc);
83+
}
84+
8085
// validate filters
8186
if (rangeEnd <= rangeStart)
8287
{

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@
273273
<data name="JobRefineFilters" xml:space="preserve">
274274
<value>There are more than 1000 jobs for the filter combination you have provided. Kindly refine your filters to fetch the job you want.</value>
275275
</data>
276+
<data name="JobTimeFiltersShouldBeSpecifiedInUtc" xml:space="preserve">
277+
<value>Please specify From and To filter values in UTC. Other timezones are not supported.</value>
278+
</data>
276279
<data name="JobToShouldBeGreaterThanFrom" xml:space="preserve">
277280
<value>To filter should not be less than From filter.</value>
278281
</data>

0 commit comments

Comments
 (0)