[Mono-list] Patch for DataTime.cs
Fri, 28 Feb 2003 02:31:58 +0800
Please update your cvs to see if my patch solved these two. I suppose it does.
My patch does a bit more, because a DateTime may not only hold a dateTime, but
also some other types, so it should be able to parse them too. As a result,
there is a huge list of formats to test for.
I am now looking at your corlib patches.
----- Original Message -----
From: "Elan Feingold" <email@example.com>
To: "'Alan Tam'" <Tam@SiuLung.com>; "'Mono-List'" <firstname.lastname@example.org>
Sent: Friday, February 28, 2003 2:09 AM
Subject: RE: [Mono-list] Patch for DataTime.cs
> > Interestingly, I am also doing something related to DateTime, but in
> > System.Xml.XmlConverter. It seems that in Mono, "zzzzzz" does not
> work. And I
> > cannot find its definition in MS's doc too.
> OK, we may have overlapped there. I changed XmlConvert.ToDateTime() to:
> public static DateTime ToDateTime(string s)
> string format = "yyyy-MM-ddTHH:mm:sszzzzzz";
> return DateTime.ParseExact(s, format, null);
> public static string ToString(DateTime value)
> return (value.ToString("s",
> CultureInfo.InvariantCulture) +
> value.ToString ("zzz"));
> This makes it match the MS impl., and lets the XML [de]serialization I'm
> working on work perfectly.
> > The three characters are Byte Order Mark (BOM) of UTF-8 encoding. It
> > have been surpressed by your terminal, if it is implemented correctly.
> Cool, I just changed PuTTY and now it works perfectly. Thanks!!!!
> Mono-list maillist - Monoemail@example.com