On Sun, 23 Mar 2003, Eugene van der Pijll wrote: > Question: what should the result of this comparison be? > > my $dt1 = DateTime->new( year => 2003, month => 3, day => 23, hour => 12, > time_zone => 'America/Chicago' ); > > my $dt2 = DateTime->new( year => 2003, month => 3, day => 23, hour => 12, > time_zone => 'floating'); > > print '$dt1 <=> $dt2: ', $dt1 <=> $dt2, "\n"; > > I think these two datetimes should be equal: a floating time should be > converted to the time zone of the other object, before it is compared.
This is funny. I was thinking about this the other day and meant to bring it up on the list. Then I forgot. And when I saw your last patch I kept thinking "there's something else related to floating time zones I need to look at", but I couldn't remember what it was. > Again, I've included a patch below. Please take a look to see if you > like it. I like the general idea, but I'm not so sure about changing string comparison to do one thing and numeric the other. Also, I think instead of giving a new flag to DateTime->compare, we should probably have two different comparison methods. I'll apply the patch and then play with it a bit. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
