Looking at Date::ICal version 1.70, it says:

new() handles timezones. It defaults times to UTC (Green­ wich Mean Time, also called Zulu). If you want to set up a time that's in the US "Pacific" timezone, which is GMT-8, use something like:

my $ical = Date::ICal->new( ical => '19971024T120000', offset => "-0800");
That 'tz' has no effect for me.

Your example gives:

1..8 ok 1 - new() returned something ok 2 - and it's the right class ok 3 - sec() not ok 4 - min() # Failed test (test056.pl at line 19) # got: '42' # expected: '12' not ok 5 - hour() # Failed test (test056.pl at line 20) # got: '0' # expected: '16' not ok 6 - day() # Failed test (test056.pl at line 21) # got: '6' # expected: '16' ok 7 - month() ok 8 - year() # Looks like you failed 3 tests of 8.
after changing the tz-line to
offset => '+0530'

This looks correct.

P.S. My sig is no insult, too :-)

alex pleiner <alex@zeitform.de>
zeitform Internet Dienste


In reply to Re: Test::More bug? by projekt21
in thread Test::More bug? by jens

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.