On 7/2/04 Rick Measham wrote:
>DateTime->now() returns a UTC time unless given a time zone. 

>On the other hand, DateTime->new() returns the local time zone unless 
>otherwise instructed.
>
>Dave, can you enlighten me as to why this is the case? Shouldn't all 
>constructors that don't have a time_zone attribute assume the same? 
>(Which I'd prefer to be local if we can get it)

Some of us need non-localized times; i.e., "floating". UTC as default is
a Good Thing in some scientific contexts, for example. And for
multi-location calcs, localization should be the last thing to be
applied, not the first.

But why DT->new() and DT->now() don't return the same thing, whichever
it is, I don't recall.

- Bruce

__bruce__van_allen__santa_cruz__ca__

Reply via email to