Created
June 12, 2012 05:42
-
-
Save ChrisMissal/2915408 to your computer and use it in GitHub Desktop.
Using the DebuggerDisplayAttribute to show the UTC and Local time of a DateTime property.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Issue | |
{ | |
public Issue() | |
{ | |
Created = DateTime.UtcNow; | |
} | |
[DebuggerDisplay("Local = {Created.ToLocalTime()}, UTC = {Created}")] | |
public DateTime Created { get; private set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment