There are some extensive comments in Piece.xs about the CRT, the environment (especially $ENV{TZ}) and tzset - specifically:
* Therefore, we need to retrieve the value of $ENV{TZ} and call CRT * putenv() to update the CRT copy of the environment (if it is differ +ent) * whenever we're about to call tzset().
And the 2 failing tests I get when I "mix runtimes" come from:
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', 'EST'); }
I expect that when Time::Piece is built with a compiler that uses a different runtime, Time::Piece::_tzset() registers the environment change ok, but registers it with the *wrong* runtime (for the purposes of Time::Piece, at least).

Not sure how this could be fixed. With which runtime will Time::Piece::_tzset() register the change ?
With the runtime of the compiler that built perl ? ... or with the runtime of the compiler that built Time::Piece ?
I suspect it must be the latter, and the trick would be to get Time::Piece::_tzset() to register the change with the former. (Or vice-versa :-)

Cheers,
Rob

In reply to Re^9: Testing Time::Piece on Windows/VC by syphilis
in thread Testing Time::Piece on Windows/VC by Corion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.