From 2bfdb72e1b10824174f4f0463d3973801c991a13 Mon Sep 17 00:00:00 2001 From: Tsunamical Date: Wed, 1 Feb 2017 10:18:09 -0500 Subject: [PATCH] Tests: Use DateTime.UtcNow for test cases DateTime.UtcNow is considerably faster than DateTime.Now, and since this value isn't used for actual game purposes, we can take advantage of it. --- Tests/PKHeX.Tests/PKM/PKMTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/PKHeX.Tests/PKM/PKMTests.cs b/Tests/PKHeX.Tests/PKM/PKMTests.cs index 022b377be..a537edb98 100644 --- a/Tests/PKHeX.Tests/PKM/PKMTests.cs +++ b/Tests/PKHeX.Tests/PKM/PKMTests.cs @@ -52,7 +52,7 @@ namespace PKHeX.Tests.PKM Assert.AreEqual(0, pk.MetYear, "Met_Year was not zeroed when MetDate is set to null"); // Ensure setting to a date sets the components - var now = DateTime.Now; + var now = DateTime.UtcNow; // -- Set to something else first pk.MetDay = 12; pk.MetMonth = 12; @@ -108,7 +108,7 @@ namespace PKHeX.Tests.PKM Assert.AreEqual(0, pk.EggMetYear, "Egg_Year was not zeroed when EggMetDate is set to null"); // Ensure setting to a date sets the components - var now = DateTime.Now; + var now = DateTime.UtcNow; // -- Set to something else first pk.EggMetDay = 12; pk.EggMetMonth = 12;