Perl

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Change 26208: Just be explicit about $TZ.

    0 answers - 1658 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Change 26208 by stevep@stevep-mccoy on 2005/11/26 02:56:26
    Just be explicit about $TZ.
    Affected files
    //depot/perl/ext/PSIX/t/time.t#3 edit
    Differences
    //depot/perl/ext/PSIX/t/time.t#3 (text)
    Index: perl/ext/PSIX/t/time.t
    perl/ext/PSIX/t/time.t#2~26207~Fri Nov 25 18:32:10 2005
    perl/ext/PSIX/t/time.tFri Nov 25 18:56:26 2005
    @@ -6,20 +6,19 @@
    use PSIX;
    use Test::More qw(no_plan);
    -# go to UTC to avoid DST issues around the world when testing
    -{
    - no warnings 'uninitialized';
    - $ENV{TZ} = undef;
    -}
    +# go to UTC to avoid DST issues around the world when testing. SUS3 says that
    +# null should get you UTC, but some environments want the explicit names.
    +# Those with a working tzset() should be able to use the TZ below.
    +$ENV{TZ} = "UTC0UTC";
    SKIP: {
    # It looks like PSIX.xs claims that only VMS and Mac S traditional
    - # don't have tzset(). A config setting might be helpful. Win32 actually
    - # seems ambiguous
    + # don't have tzset(). Win32 works to call the function, but it doesn't
    + # actually do anything. Cygwin works in some places, but not others. The
    + # other Win32's below are guesses.
    skip "No tzset()", 2
    - if $^ eq "MS" || $^ eq "VMS" || $^ eq "cygwin" ||
    - $^ eq "MSWin32" || $^ eq "dos" || $^ eq "interix" ||
    - $^ eq "openbsd";
    + if $^ eq "MS" || $^ eq "VMS" || $^ eq "cygwin" || $^ eq "djgpp" ||
    + $^ eq "MSWin32" || $^ eq "dos" || $^ eq "interix";
    tzset();
    my @tzname = tzname();
    like($tzname[0], qr/[GMT|UTC]/i, "tzset() to GMT/UTC");
    End of Patch.

Re: Change 26208: Just be explicit about $TZ.


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 1 =
QUESTION ON "Perl"

EMSDN.COM