File 04local.t, Test 8 errors with:

t/04local..........NOK 8# Failed test (t/04local.t at line 88)
# The object isn't a 'DateTime::TimeZone::America::New_York' it's a 'DateTime::TimeZone::Australia::Melbourne'


That's because my /etc/sysconfig/clock has 'Australia/Melbourne' rather than 'America/NewYork'. The test however, expects the NY zone as it attempts to redefine _read_etc_sysconfig_clock. So, something is screwy here :)

Cheers!
Rick



SKIP:
{
    skip "cannot read /etc/sysconfig/clock", 2
        unless -r '/etc/sysconfig/clock' && -f _;

$^W = 0;
local *DateTime::TimeZone::Local::_readlink = sub { undef };
local *DateTime::TimeZone::Local::_from_etc_timezone = sub { undef };
local *DateTime::TimeZone::Local::_read_etc_sysconfig_clock = sub { 'US/Eastern' };
$^W = 1;


local $ENV{TZ} = '';

my $tz;
eval { $tz = DateTime::TimeZone->new( name => 'local' ) };
is( $@, '', 'valid time zone name in /etc/sysconfig/clock should not die' );
isa_ok( $tz, 'DateTime::TimeZone::America::New_York' );
}
--
--------------------------------------------------------
There are 10 kinds of people:
those that understand binary, and those that don't.
--------------------------------------------------------
The day Microsoft makes something that doesn't suck
is the day they start selling vacuum cleaners
--------------------------------------------------------
"Write a wise proverb and your name will live forever."
-- Anonymous
--------------------------------------------------------

Reply via email to