On Fri, 24 Apr 2009, Metz, Bobby wrote:

I don't have need for a solution, but I agree with Shane's point. It seems to me that "truncate-to-day" logically means the start of the day which, due to DST rules, does not necessarily mean 00:00:00. The later is a fallacy of non-DST thinking. So if the existing DST rules for a time zone define a day as starting @ 01:00:00, shouldn't a DST intelligent framework such as DateTime treat truncate-to-day routines accordingly?

The real problem is that there's no date-only class that's part of DateTime.

When someone says "today" they probably don't want "1:00AM", they want
"2009-02-24" at any time.

I'm sure that if the behavior were changed so that it found the first valid time, someone would come along later and complain about how this is weird:

  my $tomorrow = DateTime->today()->add( days => 1 );

Why is it 1:00 AM?

Nothing has made me hate date & times as much as working on DateTime ;)


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/

Reply via email to