cmp_ok($t->daylight_savings, '==', 0);
# ->tzoffset?
-{
- local $ENV{TZ} = "EST";
+my $is_pseudo_fork = 0;
+if (defined &Win32::GetCurrentProcessId
+ ? $$ != Win32::GetCurrentProcessId() : $^O eq "MSWin32" && $$ < 0) {
+ $is_pseudo_fork = 1;
+}
+SKIP: {
+ skip "can't register TZ changes in a pseudo-fork", 2 if $is_pseudo_fork;
+ local $ENV{TZ} = "EST5";
+ Time::Piece::_tzset(); # register the environment change
my $lt = localtime;
cmp_ok(scalar($lt->tzoffset), 'eq', '-18000');
- cmp_ok($lt->strftime("%z"), 'eq', '-0500');
+ cmp_ok($lt->strftime("%Z"), 'eq', 'EST');
}
cmp_ok(($t->julian_day / 2451604.0243 ) - 1, '<', 0.001);