Skip to content

Commit 045092b

Browse files
committed
fixing datetime tostring locale issue
1 parent 56de02e commit 045092b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Jobs/GetAzureRMBackupJob.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using System;
16+
using System.Globalization;
1617
using System.Management.Automation;
1718
using System.Collections.Generic;
1819
using System.Xml;
@@ -139,10 +140,12 @@ protected override void ProcessRecord()
139140
WriteDebug(String.Format(Resources.TypeFilter, Type));
140141
WriteDebug(String.Format(Resources.JobIdFilter, JobId));
141142

143+
DateTimeFormatInfo format = new CultureInfo("en-US").DateTimeFormat;
142144
Mgmt.CSMJobQueryObject queryParams = new Mgmt.CSMJobQueryObject()
143145
{
144-
StartTime = From.Value.ToString("yyyy-MM-dd hh:mm:ss tt"),
145-
EndTime = To.Value.ToString("yyyy-MM-dd hh:mm:ss tt"),
146+
147+
StartTime = From.Value.ToString("yyyy-MM-dd hh:mm:ss tt", format),
148+
EndTime = To.Value.ToString("yyyy-MM-dd hh:mm:ss tt", format),
146149
Operation = Operation,
147150
Status = Status,
148151
WorkloadType = Type,

0 commit comments

Comments
 (0)