develooper Front page | perl.datetime | Postings from January 2003

Re: Changing time zones?

Thread Previous | Thread Next
From:
Dave Rolsky
Date:
January 31, 2003 13:22
Subject:
Re: Changing time zones?
Message ID:
Pine.LNX.4.51.0301311520040.32608@urth.org
On Fri, 31 Jan 2003, Jonathan Scott Duff wrote:

> > I lean towards the former, but we might need both.
>
> recalc local.  always.

Yep, that's what I've realized.

I also realized that changing the time zone needs to be explicitly
diferent from changing anything else, because this:

  $dt->set( hour => 6, time_zone => 'America/Chicago' );

is very confusing.  The "hour" parameter is specifying a _local_ time
(just like for the constructor), but local to what?

So now the ->set method won't accept a time_zone, but there will be a
separate set_time_zone method.  This is much simpler and forces users to
explicitly think about what order they'd the operations to be done in.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About