[System.ServiceModel] Don't use DateTime.Now for measuring elapsed time
[mono.git] / mcs / class / System.ServiceModel / old-code / HttpReplyChannel.cs
index 9e1a0f04e886d419f2291266017f8ed9504e0a7d..a8b28c3ebea482df04545bc14addc81d54772b8a 100644 (file)
@@ -85,14 +85,14 @@ namespace System.ServiceModel.Channels
 
                protected override void OnClose (TimeSpan timeout)
                {
-                       DateTime start = DateTime.Now;
+                       DateTime start = DateTime.UtcNow;
                        if (reqctx != null)
                                reqctx.Close (timeout);
 
                        // FIXME: consider timeout
-                       AbortConnections (timeout - (DateTime.Now - start));
+                       AbortConnections (timeout - (DateTime.UtcNow - start));
 
-                       base.OnClose (timeout - (DateTime.Now - start));
+                       base.OnClose (timeout - (DateTime.UtcNow - start));
                }
 
                public override bool TryReceiveRequest (TimeSpan timeout, out RequestContext context)