Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Tests failing in GuidGeneratorTest fixture #23

tjrobinson opened this Issue May 3, 2012 · 5 comments


None yet
2 participants

On the master branch two of the tests are failing:


System.ArgumentException : The UTC Offset of the local dateTime parameter does not match the offset argument.
Parameter name: offset

at System.DateTimeOffset..ctor(DateTime dateTime, TimeSpan offset)
at FluentCassandra.GuidGenerator.GenerateTimeBasedGuid(DateTime dateTime, Byte[] node) in GuidGenerator.cs: line 95
at FluentCassandra.GuidGenerator.GenerateTimeBasedGuid(DateTime dateTime) in GuidGenerator.cs: line 84
at FluentCassandra.GuidGeneratorTest.GetDateTimeLocal() in GuidGeneratorTest.cs: line 57


Expected: 1980-03-14 12:23:42.112
But was:  1980-03-14 11:23:42.112

at NUnit.Framework.Assert.That(Object actual, IResolveConstraint expression, String message, Object[] args)
at FluentCassandra.GuidGeneratorTest.GetDateTimeUnspecified() in GuidGeneratorTest.cs: line 49

I will investigate and if I can resolve the problem then I'll submit a fix.

It's worth mentioning that I'm running this on a machine in the UK which is in the "(UTC) Dublin, Edinburgh, Lisbon, London" time zone, currently in Daylight Saving Time (UTC +1).

@ghost ghost assigned nberardi May 9, 2012


nberardi commented May 9, 2012

Thank you I will take a look at this.


nberardi commented May 9, 2012

I had a similar issue just pop up recently. I need to investigate further.


nberardi commented May 9, 2012

It appears the DateTime and DateTimeOffset objects don't abide by day light savings time.

nberardi added a commit that referenced this issue May 9, 2012

it appears that the DateTimeOffset object doesn't abide by day light …
…savings time when taking into account the offset in certain situations which was causing the exception reported in issue #23, this commit should fix that problem

nberardi commented May 9, 2012

This change will go out with the next push to NuGet. Thank you for submitting this bug.

@nberardi nberardi closed this May 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment