Skip to content

Instantly share code, notes, and snippets.

@marek-safar
Created January 20, 2012 10:01
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 marek-safar/1646514 to your computer and use it in GitHub Desktop.
Save marek-safar/1646514 to your computer and use it in GitHub Desktop.
using System;
using System.Globalization;
class C
{
public static void Main ()
{
const DateTimeStyles DefaultStyles = DateTimeStyles.AssumeUniversal | DateTimeStyles.AllowWhiteSpaces;
string s = "Sun, 06 Nov 1994 08:49:37 GMT";
DateTimeOffset value;
bool b = DateTimeOffset.TryParseExact (s, "r", DateTimeFormatInfo.InvariantInfo, DefaultStyles, out value);
Console.WriteLine (b);
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment