Created
October 25, 2016 10:26
-
-
Save sebnilsson/78c3c62afa36159a693b0320c58dd625 to your computer and use it in GitHub Desktop.
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 static class DateTimeRfc3339Extensions | |
{ | |
public static string ToRfc3339String(this DateTime dateTime) | |
{ | |
string rfc3339 = dateTime.ToString("yyyy-MM-dd'T'HH:mm:ss.fffzzz", DateTimeFormatInfo.InvariantInfo); | |
return rfc3339; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment