Commit 143bc407 authored by Nick Craver's avatar Nick Craver

Fix tests that breaks on days where daylight savings time changes.

This test was breaking in my timezone because it's already DST in Tokyo, but not here. I wish that was the lead in to a joke or something but...yeah no. FML.
parent 265383b1
......@@ -64,7 +64,7 @@ public void TestBasicExpiryDateTime(bool disablePTimes, bool utc)
var conn = muxer.GetDatabase();
conn.KeyDelete(key, CommandFlags.FireAndForget);
var offset = utc ? TimeSpan.Zero : TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time").BaseUtcOffset;
var offset = utc ? TimeSpan.Zero : TimeZoneInfo.Local.BaseUtcOffset;
var now = utc ? DateTime.UtcNow : new DateTime(DateTime.UtcNow.Ticks + offset.Ticks, DateTimeKind.Local);
var resultOffset = utc ? TimeSpan.Zero : now - DateTime.Now;
Output.WriteLine("Now: {0}", now);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment