[Mono-dev] Patch to fix comparison of DateTime objects in Mono.Data.SqlExpressions

Adar Wesley adar.wesley at gmail.com
Thu Jul 23 15:00:17 EDT 2009


Hi,

I didn't check the code, but this comparison seemed questionable to me:
9.  +                       else if (o2
is<http://www.google.com/search?q=is+msdn.microsoft.com>DateTime && o1
is <http://www.google.com/search?q=is+msdn.microsoft.com> string && Thread.
CurrentThread.CurrentCulture != CultureInfo.InvariantCulture) {

What happens if (o2
is<http://www.google.com/search?q=is+msdn.microsoft.com>DateTime && o1
is <http://www.google.com/search?q=is+msdn.microsoft.com> string && Thread.
CurrentThread.CurrentCulture == CultureInfo.InvariantCulture)

Is this case covered?

---
Adar Wesley


On Thu, Jul 23, 2009 at 9:52 PM, Veerapuram Varadhan
<vvaradhan at novell.com>wrote:

> Hi Adam,
>
> Patch looks fine to go - along with a test case.
>
> Thanks,
>
> V. Varadhan
>
> On Thu, 2009-07-23 at 11:32 -0700, Adam Wendt wrote:
> > http://pastebin.com/m45199c62
> >
> > This makes it possible to compare DateTime to string (parsable to
> > DateTime) when the existing DateTime is on the right rather than just
> > when it is on the left (the previous behavior)
> >
> > Adam
> > Adam Wendt Consulting
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090723/13199673/attachment.html 


More information about the Mono-devel-list mailing list