Skip to content

Instantly share code, notes, and snippets.

@ChrisMissal
Created June 12, 2012 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChrisMissal/2915408 to your computer and use it in GitHub Desktop.
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.
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