Closed makcakaya closed 9 years ago
If you just want to test you could also use DateTime.Now.Date that does not have time information.
Is there any use case other then using DateTime.Now during Testing?
What is your real use case? Maybe we can find a nice solution for it.
Yeah, using DateTime.Date is a good option.
I was just surprised when I did serialization-deserialization and the Expiration's did not match.
Can we close this issue?
Yes.
Hi Daniel;
I have problem when testing expiration date with milliseconds. I know, no one will ever need to use milliseconds to set an expiration date but the issue makes writing tests hard.
Test code is below:
Using
DateTimeStyles.RoundtripKind
enum seems to solve the issue but the MSDN says it cannot be used withDateTimeStyles.AssumeUniversal
.