[Mono-list] if-modified-since
Piers Haken
piersh@friskit.com
Mon, 18 Aug 2003 19:56:06 -0700
I think you missed the point of my comment below. There's still a bug in
DateTime where Parse isn't taking the local timezone into account when
parsing an RFC1123 date.
Here's an example (bug #47720):
using System;
class Test
{
public static void Main (string [] rgszArgs)
{
DateTime dt =3D DateTime.Parse ("Sat, 29 Oct 1994 12:00:00
GMT");
Console.WriteLine (dt);
}
}
On windows, with my timezone set to PDT (pacific + daylight), the above
program prints:
10/29/1994 5:00:00 AM
Whereas on my linux box I get:
10/29/1994 12:00:00
This also implies that line 35 of StaticFileHandler.cs should NOT
contain a call to 'ToUniversalTime()'.
Piers.
> -----Original Message-----
> From: Gonzalo Paniagua Javier [mailto:gonzalo@ximian.com]=20
> Sent: Monday, August 18, 2003 6:42 PM
> To: mono-list@lists.ximian.com
> Subject: RE: [Mono-list] if-modified-since
>=20
>=20
> El dom, 17-08-2003 a las 20:59, Piers Haken escribi=F3:
> > Yeah, it looks like it can parse the date part fine, it's=20
> just needs=20
> > to do a ToLocalTime() on the result.
>=20
> The patch is in CVS.
> I changed it to use ParseExact with the "r" format (RFC1123).
>=20
> Thanks!
>=20
> -Gonzalo
>=20
>=20
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com=20
> http://lists.ximian.com/mailman/listinfo/mono-> list
>=20