On Thu, 6 Feb 2003, Rick Measham wrote: > I'd argue against this (and possibly the code in TimeZone.pm for handling a > time zone of "local"). > > I live in Australia and my timezone is +1100. But I host in the US someplace > where the machine has a timezone of -0600. I'd prefer to be able to set my > local timezone. Maybe ask the user on install but make a default of the > machine's local TZ?
my $dt = DateTime->new( ..., time_zone => 'Australia/Perth' ); or my $dt = DateTime->new( ..., time_zone => '+1100' ); or my $dt = DateTime->new( ..., time_zone => 39600 ); Just to make a few things clear. 1. The "local" time is _calculated_ on each request. We don't calculate it when the module is installed and then save it forever. 2. You can change your box's TZ, if it's your box. If not, you can't rely on the "local" time! 3. We don't need to know your local offset for testing, except to test that setting "time_zone => 'local'" works. Testing that is not important enough to ask someone to tell us their offset, which they'll get wrong half the time anyway. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/