Skip to content

Commit 65bd1be

Browse files
committed
Swapping to UTC format for DateTimes within wrapper
1 parent 7936c7e commit 65bd1be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SSLLabsApiWrapper/SSLLabsApiService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public Analyze AutomaticAnalyze(string host, int maxWaitInterval, int sleepInter
143143
public Analyze AutomaticAnalyze(string host, Publish publish, StartNew startNew, FromCache fromCache, int? maxHours, All all, IgnoreMismatch ignoreMismatch,
144144
int maxWaitInterval, int sleepInterval)
145145
{
146-
var startTime = DateTime.Now;
146+
var startTime = DateTime.UtcNow;
147147
var sleepIntervalMilliseconds = sleepInterval * 1000;
148148
var apiPassCount = 1;
149149
var analyzeModel = Analyze(host, publish, startNew, fromCache, maxHours, all, ignoreMismatch);
@@ -152,7 +152,7 @@ public Analyze AutomaticAnalyze(string host, Publish publish, StartNew startNew,
152152
startNew = StartNew.Ignore;
153153

154154
// Shouldn't have to check status header as HasErrorOccurred should be enough
155-
while (analyzeModel.HasErrorOccurred == false && analyzeModel.status != "READY" && (DateTime.Now - startTime).TotalSeconds < maxWaitInterval)
155+
while (analyzeModel.HasErrorOccurred == false && analyzeModel.status != "READY" && (DateTime.UtcNow - startTime).TotalSeconds < maxWaitInterval)
156156
{
157157
Thread.Sleep(sleepIntervalMilliseconds);
158158
apiPassCount ++;

0 commit comments

Comments
 (0)