rfc1123

Convert RFC 1123 date to timestamp in PHP

What is the easiest or most elegant way to convert a RFC 1123 date (From an HTTP-Expiration-header) to a UNIX timestamp? Example: Sun, 14 Aug 2005 16:13:03 GMT Do I really have to 'substr' everything? ...

DateTime to RFC-1123 gives inaccurate timezone

If I get the RFC-1123 formatted date of a DateTime object, it gives the current local time, but gives the timezone as GMT (which is inaccurate). DateTime.Now.ToString("r"); returns Fri, 12 Feb 2010 16:23:03 GMT At 4:23 in the afternoon, but my timezone is UTC+10 (plus, we're currently observing daylight saving time). Now, I can get a r...

Parsing RFC1123 formatted dates in C#, .Net 4.0

Hello, I am trying to parse dates in RFC1123 format (Thu, 21 Jan 2010 17:47:00 EST). Here is what I tried but none worked: DateTime Date = DateTime.Parse(dt); DateTime Date = DateTime.ParseExact(dt, "r", null); Could you please help me out with this? Thanks, Ruby :) ...