@INC = '../lib';
}
-my $Invoke_Perl = qq(MCR $^X "-I[-.lib]");
+my $perl = $^X;
+$perl = VMS::Filespec::vmsify($perl) if $^O eq 'VMS';
+
+my $Invoke_Perl = qq(MCR $perl "-I[-.lib]");
require "./test.pl";
plan(tests => 25);
eval "END { \$ENV{'SYS\$TIMEZONE_DIFFERENTIAL'} = $oldtz; }";
gmtime(0); # Force reset of tz offset
}
+
+ # Unless we are prepared to parse the timezone rules here and figure out
+ # what the correct offset was when the file was last revised, we need to
+ # use a file for which the current offset is known to be valid. That's why
+ # we create a file rather than using an existing one for the stat() test.
+
+ my $file = 'sys$scratch:vmsish_t_flirble.tmp';
+ open TMP, ">$file" or die "Couldn't open file $file";
+ close TMP;
+ END { 1 while unlink $file; }
+
{
use_ok('vmsish qw(time)');
$vmstime = time;
@vmslocal = localtime($vmstime);
@vmsgmtime = gmtime($vmstime);
- $vmsmtime = (stat $0)[9];
+ $vmsmtime = (stat $file)[9];
}
$utctime = time;
@utclocal = localtime($vmstime);
@utcgmtime = gmtime($vmstime);
- $utcmtime = (stat $0)[9];
+ $utcmtime = (stat $file)[9];
$offset = $ENV{'SYS$TIMEZONE_DIFFERENTIAL'};