-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Conversation
@jkotas this is the leap seconds tests you have requested in your review in the attached coreclr PR. thanks. |
fileTime = now.ToFileTime(); | ||
roundTrippedDateTime = DateTime.FromFileTime(fileTime); | ||
Assert.Equal(now, roundTrippedDateTime); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a similar test for DateTimeOffset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DateTimeOffset is using DateTime for such operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that an implementation detail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have similar test for DateTimeOffset https://github.com/dotnet/corefx/blob/master/src/System.Runtime/tests/System/DateTimeOffsetTests.cs#L518
internal ushort wSecond; | ||
internal ushort wMillisecond; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have or need tests that constructs a specific leap second time and validates that the right things happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can do that in the current time as we don't have a system with a leap seconds.
@stephentoub @jkotas let me know if the last commit addressed your concern. thanks. |
merging this one as I am not sure I'll be able to do more follow up in current time. if there is any pending concerns we can track it with an issue if needed. thanks all. |
* Add DateTime Leap Seconds Tests * Fix the comment * Address the feedback * small fix
* Add DateTime Leap Seconds Tests * Fix the comment * Address the feedback * small fix Commit migrated from dotnet/corefx@65c580a
dotnet/coreclr#21420