Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Time::ParseDate - Strawberry PERL 5.32 on Win 10

by FFSparky (Acolyte)
on Jan 13, 2021 at 19:56 UTC ( [id://11126864]=perlquestion: print w/replies, xml ) Need Help??

FFSparky has asked for the wisdom of the Perl Monks concerning the following question:

All trying get up to a current version of PERL / Strawberry PERL 5.32 on my new Win 10 system.

I cannot get Time::ParseDate to install as the test fail.

As suggested I have set the TZ environment variable in my command window to TZ=PST8PDT

I'm tryin to force it and skip the test and the command I am running is: cpan -fTi Time::ParseDate

But it won't install:

cpan -fTi Time::ParseDate Loading internal logger. Log::Log4perl recommended for better logging CPAN: CPAN::SQLite loaded ok (v0.219) Database was generated on Wed, 13 Jan 2021 20:20:07 GMT CPAN: Module::CoreList loaded ok (v5.20200717) Running install for module 'Time::ParseDate' CPAN: Digest::SHA loaded ok (v6.02) CPAN: Compress::Zlib loaded ok (v2.096) Checksum for C:\DEV_TO~1\PERL-6~1\cpan\sources\authors\id\M\MU\MUIR\mo +dules\Time-ParseDate-2015.103.tar.gz ok CPAN: Archive::Tar loaded ok (v2.38) CPAN: YAML::XS loaded ok (v0.82) CPAN: CPAN::Meta::Requirements loaded ok (v2.140) CPAN: Parse::CPAN::Meta loaded ok (v2.150010) CPAN: CPAN::Meta loaded ok (v2.150010) Configuring M/MU/MUIR/modules/Time-ParseDate-2015.103.tar.gz with Make +file.PL Checking if your kit is complete... Looks good Generating a gmake-style Makefile Writing Makefile for Time::ParseDate Writing MYMETA.yml and MYMETA.json MUIR/modules/Time-ParseDate-2015.103.tar.gz C:\Dev_Tools\PERL-64Bit\perl\bin\perl.exe Makefile.PL -- OK Running make for M/MU/MUIR/modules/Time-ParseDate-2015.103.tar.gz cp lib/Time/JulianDay.pm blib\lib\Time\JulianDay.pm cp lib/Time/DaysInMonth.pm blib\lib\Time\DaysInMonth.pm cp lib/Time/ParseDate.pm blib\lib\Time\ParseDate.pm cp lib/Time/Timezone.pm blib\lib\Time\Timezone.pm cp lib/Time/CTime.pm blib\lib\Time\CTime.pm MUIR/modules/Time-ParseDate-2015.103.tar.gz C:\DEV_TO~1\PERL-6~1\c\bin\gmake.exe -- OK Running make test for MUIR/modules/Time-ParseDate-2015.103.tar.gz Skip blib\lib\Time\Timezone.pm (unchanged) Skip blib\lib\Time\CTime.pm (unchanged) Skip blib\lib\Time\JulianDay.pm (unchanged) Skip blib\lib\Time\DaysInMonth.pm (unchanged) Skip blib\lib\Time\ParseDate.pm (unchanged) "C:\Dev_Tools\PERL-64Bit\perl\bin\perl.exe" "-MExtUtils::Command::MM" +"-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness( +0, 'blib\lib', 'blib\arch')" t/*.t t/datetime.t .. ok t/metdate.t ... skipped: It seems localtime() does not honor $ENV{TZ} +when set in the test script. t/order1.t .... 1/? # Failed test 'Europe/Moscow, DST permanent 2009' # at t/order1.t line 33. # got: '1257058800' # expected: '1257022800' # Failed test 'Europe/Moscow, DST permanent 2013' # at t/order1.t line 34. # got: '1369897200' # expected: '1369857600' # Looks like you failed 2 tests of 5. t/order1.t .... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/5 subtests t/order2.t .... 1/? # Failed test 'Europe/Moscow, DST permanent 2013' # at t/order2.t line 31. # got: '1369897200' # expected: '1369857600' # Failed test 'Europe/Moscow, DST permanent 2009' # at t/order2.t line 32. # got: '1257058800' # expected: '1257022800' # Looks like you failed 2 tests of 5. t/order2.t .... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/5 subtests Test Summary Report ------------------- t/order1.t (Wstat: 512 Tests: 5 Failed: 2) Failed tests: 3-4 Non-zero exit status: 2 t/order2.t (Wstat: 512 Tests: 5 Failed: 2) Failed tests: 3-4 Non-zero exit status: 2 Files=4, Tests=335, 2 wallclock secs ( 0.08 usr + 0.05 sys = 0.12 C +PU) Result: FAIL Failed 2/4 test programs. 4/335 subtests failed. gmake: *** [Makefile:851: test_dynamic] Error 2 MUIR/modules/Time-ParseDate-2015.103.tar.gz C:\DEV_TO~1\PERL-6~1\c\bin\gmake.exe test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports MUIR/modules/Time-ParseDate-2015.103.tar.gz Running make install for MUIR/modules/Time-ParseDate-2015.103.tar.gz Skip blib\lib\Time\ParseDate.pm (unchanged) Skip blib\lib\Time\CTime.pm (unchanged) Skip blib\lib\Time\DaysInMonth.pm (unchanged) Skip blib\lib\Time\JulianDay.pm (unchanged) Skip blib\lib\Time\Timezone.pm (unchanged) Appending installation info to C:\DEV_TO~1\PERL-6~1\perl\lib/perllocal +.pod MUIR/modules/Time-ParseDate-2015.103.tar.gz C:\DEV_TO~1\PERL-6~1\c\bin\gmake.exe install UNINST=1 -- OK Stopping: 'install' failed for 'Time::ParseDate'.

The other question I am considering, Is Time::ParseDate still a good module or should I consider a diffent module. My concern here is I have several scripts that use this thus I may have a challenge ahead in modifying some old scripts.

As always thanks in advance for your wisdom!

Replies are listed 'Best First'.
Re: Time::ParseDate - Strawberry PERL 5.32 on Win 10
by GrandFather (Saint) on Jan 13, 2021 at 20:50 UTC

    It looks like support for Time::ParseDate on Windows isn't great. The CPAN Testers report is pretty dire for Windows support with only 5.28.2 showing any success.

    Time::Piece may do the trick for you with the advantage that it is core in Perl builds since 5.9.5.

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
      GrandFather, Thank you for the guidance in the near future I will be migrating to this !
Re: Time::ParseDate - Strawberry PERL 5.32 on Win 10
by marto (Cardinal) on Jan 13, 2021 at 20:35 UTC

    Since you're on Strawberry cpanm -n Time::ParseDate will install without running tests. Testers matrix shows you aren't the only one having this issue. You could start by checking those particular tests if you care.

      marto, Thanks that did the trick thank you. This has also revealed that the Time::ParseDate really needs to be retired as upon further test of an existing script the results are not correct so I am going to also takes GrandFather's advice and switch to Time::Piece.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11126864]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-24 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found