RE: Time zones?
Hi Jason, Jason Bodnar wrote: > DateTime complains that PST is ambiguous so I tried replacing PST with > 'US/Pacific', 'America/Los_Angeles' and 'PST8PDT' but DateTime says > it doesn't recognise [sic] any of those. So what timezone label will > DateTime accept for Pacific Standard Time? Odd, America/Los_Angeles should work. use strict; use warnings; use DateTime; my $dt = DateTime->now( time_zone => 'America/Los_Angeles'); print $dt; prints 2005-11-04T14:04:52 You may want to include a small test script which demonstrates the error. Hope this helps Ron Hill
RE: Time zones?
Hi Jason, Jason Bodnar wrote: > #!/usr/bin/perl > > use DateTime::Format::Strptime; > my $parser = new DateTime::Format::Strptime(pattern => '%d-%b-%Y > %H:%M %Z', on_error => > 'croak'); my $dt = $parser->parse_datetime("30-Oct-2005 01:04 > America/Los_Angeles"); __END__ You are using the %Z as the timezone, I thought that was for output only. (Rick needs to comment on that) > > $ perl test.pl > I don't recognise the timezone America. at test.pl line 6 > > Seems to be a problem specifically with Strptime because your example > worked for me. I guess Strptime doesn't know about the same TZs as > DateTime.
RE: months between 2 dates
Hi Badri, Soundararajan, Badrinarayanan wrote: > Hi, > This is the code i originally had and this is what i replaced with. > both are hogging a lot of time. > (code snipped) Here is my attempt using DateTime :-) use strict; use warnings; use DateTime; use DateTime::Format::Strptime; my $format = new DateTime::Format::Strptime( pattern => '%D' ); my @array = map { $format->parse_datetime($_) } (); my $dur = $array[0]->delta_md( $array[1] ); print $dur->in_units('months'); __DATA__ 01/21/04 05/13/05 NOTE: See the How Date Math is Done section of the DateTime.pm documentation for more details. I hope this helps Ron
RE: months between 2 dates
Hello Badri, Soundararajan, Badrinarayanan wrote: > Hi, > (snipped) > > Initially i used DateManip's DateCalc method, but that is hogging too > much memory. Perhaps you could provide the code you have. > So i am trying to move to DateCalc. > > Could you give me the basic logic and conditions to check for months > between 2 dates > The RECIPES section of that module has something you could use? How do I check whether a given date lies within a certain range of dates? use Date::Calc qw( Date_to_Days ); $lower = Date_to_Days($year1,$month1,$day1); $upper = Date_to_Days($year2,$month2,$day2); $date = Date_to_Days($year,$month,$day); if (($date >= $lower) && ($date <= $upper)) { # ok } else { # not ok } I hope this helps. Ron
DateTime-Format-Duration failing tests (1.02 version)
Hi Rick, DateTime-Format-Duration is failing its tests for 2_fmt_normalise. Any ideas? Thanks Ron Hill D:\perl_modules\DateTime-Format-Duration-1.02>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.9782.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bl ib\lib', 'blib\arch')" t/*.t t/0_pod..ok t/1_load.ok t/2_fmt_normaliseok 32/52 t/2_fmt_normaliseNOK 34# Failed test (t/2_fmt_normalise.t at lin e 115) # got: '--01-15 00:00:00' # expected: '--01-14 00:00:00' # If you send an error report, please include the output of: # C:\Perl\bin\perl.exe t/2_fmt_normalise.t 34! t/2_fmt_normaliseok 39/52# DST ends, Day is 25 hours long t/2_fmt_normaliseok 40/52 t/2_fmt_normaliseNOK 41# Failed test (t/2_fmt_normalise.t at lin e 115) # got: '-00-02 00:00:00' # expected: '-00-01 23:00:00' # If you send an error report, please include the output of: # C:\Perl\bin\perl.exe t/2_fmt_normalise.t 41! t/2_fmt_normaliseNOK 42# Failed test (t/2_fmt_normalise.t at lin e 115) # got: '-00-00 00:00:00' # expected: '-00-00 01:00:00' # If you send an error report, please include the output of: # C:\Perl\bin\perl.exe t/2_fmt_normalise.t 42! t/2_fmt_normaliseok 44/52# DST starts, Day is 23 hours long t/2_fmt_normaliseNOK 45# Failed test (t/2_fmt_normalise.t at lin e 115) # got: '-00-02 00:00:00' # expected: '-00-02 01:00:00' # If you send an error report, please include the output of: # C:\Perl\bin\perl.exe t/2_fmt_normalise.t 45! t/2_fmt_normaliseNOK 46# Failed test (t/2_fmt_normalise.t at lin e 115) # got: '-00-00 00:00:00' # expected: '--00-00 01:00:00' # If you send an error report, please include the output of: # C:\Perl\bin\perl.exe t/2_fmt_normalise.t 46! t/2_fmt_normaliseok 47/52# Leap Second adds an extra second to one o f the minutes. t/2_fmt_normaliseok 49/52 t/2_fmt_normaliseNOK 50# Failed test (t/2_fmt_normalise.t at lin e 115) # got: '-00-00 00:02:00' # expected: '-00-00 00:01:60' # If you send an error report, please include the output of: # C:\Perl\bin\perl.exe t/2_fmt_normalise.t 50! t/2_fmt_normaliseok 51/52# Looks like you failed 6 tests of 52. t/2_fmt_normalisedubious Test returned status 6 (wstat 1536, 0x600) DIED. FAILED tests 34, 41-42, 45-46, 50 Failed 6/52 tests, 88.46% okay t/3_fmt_normalise_isook t/4_fmt_normalise_no_baseok t/5_fmt_no_normalise.ok t/6_parse# Individual Components t/6_parseok 14/24# Group Components t/6_parseok t/7_misc.ok t/8_negativesok Failed Test Stat Wstat Total Fail Failed List of Failed --- t/2_fmt_normalise.t6 1536526 11.54% 34 41-42 45-46 50 Failed 1/9 test scripts, 88.89% okay. 6/211 subtests failed, 97.16% okay. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xff' Stop. D:\perl_modules\DateTime-Format-Duration-1.02> D:\perl_modules\DateTime-Format-Duration-1.02>C:\Perl\bin\perl.exe "t/2_fmt_no alise.t" 1..52 ok 1 - Test 1:-00-00 00:00:01 should stay -00-00 00:00:01 ok 2 - Test 2:-00-00 00:00:59 should stay -00-00 00:00:59 ok 3 - Test 3:-00-00 00:00:60 should become -00-00 00:01:00 ok 4 - Test 4:-00-00 00:00:61 should become -00-00 00:01:01 ok 5 - Test 5: -00-00 00:00:119 should become -00-00 00:01:59 ok 6 - Test 6: -00-00 00:00:120 should become -00-00 00:02:00 ok 7 - Test 7: -00-00 00:00:121 should become -00-00 00:02:01 ok 8 - Test 8:-00-00 00:01:00 should stay -00-00 00:01:00 ok 9 - Test 9:-00-00 00:59:00 should stay -00-00 00:59:00 ok 10 - Test 10: -00-00 00:60:00 should become -00-00 01:00:00 ok 11 - Test 11: -00-00 00:61:00 should become -00-00 01:01:00 ok 12 - Test 12: -00-00 00:01:59 should stay -00-00 00:01:59 ok 13 - Test 13: -00-00 00:01:60 should become -00-00 00:02:00 ok 14 - Test 14: -00-00 00:01:61 should become -00-00 00:02:01 ok 15 - Test 15: -00-00 00:59:60 should become -00-00 01:00:00 ok 16 - Test 16: -00-00 00:60:60 should become -00-00 01:01:00 ok 17 - Test 17: -00-00 01:00:00 should stay -00-00 01:00:00 ok 18 - Test 18: -00-00 23:00:00 should stay -00-00 23:00:00 ok 19 - Test 19: -00-00 24:00:00 should become -00-01 00:00:00 ok 20 - Test 20: -00-00 25:00:00 should become -00-01 01:00:00 ok 21 - Test 21: -00-00
RE: hires DateTime->from_epoch( epoch => ... ) values
On Mon, 25 Jul 2005, Joshua Hoblitt wrote: > a) do nothing... nobody else seems to have noticed > b) document the limited precision issue > c) change the API to some awful Fortranish a part + b part to preserve > precision > d) turn the epoch parameter into a Math::BigFloat so a high resolution > 'string' can be passed in and document the behavior. > > It's not clear to me what the right solution is although a patch to > implement option d sans the required documentation changes is attached. That seems right to me. Does anyone object to adding Math::BigFloat as a prereq? No objections here :-) I just installed on WNT without issues (Clean install on this OS) Ron
RE: perl -w causes 8 error messages on each call of timelocal()
Hi Ortwin, >using the time::local module I found that the timelocal() function causes >8 error messages each time the function is used. If in the shebang the >option -w is removed the error messages in the http server log stop. I have tested it here and have no problems. BTY you should be Using use warnings instead of -w (snipped) >It should be easily fixed for the writer of the module. >My configuration: >Win XP Home, xampp for Windows 1.4.9 with ActivePerl 8.5.6.811. Can you provide a short test script that demonstrated this problem? What version of Time::Local are you using? Something like: use strict; use warnings; use Time::Local; print $Time::Local::VERSION; Should give it to you. I have D:\scripts>me.pl 1.11 Hope this helps Ron Hill
RE: Error Message using Time::Local
Hi Behzad, (snipped) CASE 1 -- > use Time::Local 'timelocal_nocheck'; use Time::Local qw(timelocal_nocheck timelocal); Should fix that :-) CASE 2 -- > Use Time::Local; > Use of uninitialized value in integer multiplication (*) at >C:/Perl/lib/Time/Local.pm line 76 (#1) >Day '31' out of range 1..30 at c:\myCode.pl 98 >At C:/Perl/lib/Time/Local.pm line 116 >Time::Local::timegm called at C:/Perl/lib/Time/Local/pm line 153 >Time::Local::timelocal(0, 0, 0, 31, 08, 2004) called at >C:\myCode.pl line 98 >From the Time::Local Docs It is worth drawing particular attention to the expected ranges for the values provided. The value for the day of the month is the actual day (ie 1..31), while the month is the number of months since January (0..11). This is consistent with the values returned from localtime() and gmtime(). So, If you wanted a date of Aug 31, 2004 the call to timelocal Should be: my $time = timelocal(0, 0, 0, 31, 7, 2004); And to confirm use strict; use DateTime; use warnings; use Time::Local qw(timelocal_nocheck timelocal); my $time = timelocal(0, 0, 0, 31, 7, 2004); my $dt = DateTime->from_epoch( epoch => $time ); print $dt->mdy; prints: D:\scripts>me.pl 08-31-2004 I hope this helps Ron Hill
RE: DT::C::Chinese fails a bunch of tests
Hi Maki, On Tue, 28 Jun 2005, Daisuke Maki wrote: > Dave, I seem to have found it. DT::Util::Calc's mod() function behaves oddly > when using $bigint->bmod($mod). > > Can you confirm that this will fix your problems? I am testing this and am unable to install. DateTime-calendar-chinese requires 'DateTime::Event::Chinese' => '>= 0.04', But I checked CPAN it only goes to version 0.03 Have you not yet uploaded the new version to CPAN yet? Thanks Ron Hill
RE: Problems Installing
Hi Rick, Rick Brewer wrote: > Hi Ron, > I used the ActiveState version of perl which installed w/o > needing a C compiler.I installed DJGPP in order to install the > dateTime modules. > [snippage] > perl -V shows: > +++ > Compiler: >cc='cl.exe', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE > -DNO_STRICT - ^^^ This is the problem, Activestate uses microsoft's c compiler to compile perl (5.6.1) you need to this complier when installing modules that require a C compiler. you need to use the ppm utility that ships with Activestate in order to install the these modules. You can search the datetime archive to locate a depository for you version of perl. I hope this helps. Ron Hill
RE: Problems Installing
Hi Rick, Rick Brewer wrote: > I consistently get an error on the "make" command at this point: > +++ pm_to_blib: $(TO_INST_PM) > @$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \ > "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \ > -e "pm_to_blib(qw[ < ],'$(INST_LIB)\auto','$(PM_FILTER)')" (more snippage) > I have been using DJGPP ANSI C compiler. > Is this the same compiler that you used to build perl? What is the output of perl -V? Ron Hill
RE: PERL Datetime Packaged as ppd
Eva Soltesz wrote: > Hi, > > Could you please compile the latest version of the DateTime > perl library into ppd for a very desperate windows > user of ActivePerl? Hi Eva, What version of perl are you running? I have created a ppd with: G:\modules\Time-Local>perl -v This is perl, v5.8.3 built for MSWin32-x86-multi-thread. version of perl. However, you should be able to install the module without using a c compiler. What you need is the nmake utility Download and extract the Time::Local distribution from CPAN. then open a dos window and do this G:\modules\Time-Local>perl makefile.pl Checking if your kit is complete... Looks good Writing Makefile for Time::Local G:\modules\Time-Local>nmake ^^ Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cp lib/Time/Local.pm blib\lib\Time\Local.pm G:\modules\Time-Local>nmake test ^^ Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe "-MExtUtils::Command::MM" "-e" "te ness(0, 'blib\lib', 'blib\arch')" t\Local.t t\Localok 26/133 skipped: All tests successful, 26 subtests skipped. Files=1, Tests=133, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) G:\modules\Time-Local>nmake install ^ Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Installing F:\perl\5.8.3\lib\Time\Local.pm Writing f:\perl\5.8.3\lib\MSWin32-x86-multi-thread\auto\Time\Local\.packlist Appending installation info to f:\perl\5.8.3\lib\MSWin32-x86-multi-thread/perllocal.pod G:\modules\Time-Local> This should do the trick. I hope this helps Ron Hill
RE: cpan.org - Convert DateTimes to/from Unix epoch seconds - help please
Aliasghar Jagani wrote: > Hi, > (snipped) > > I found a converter on cpan.org > > but am not sure what i need to do to make it work, like what to > download, how to install the script, etc. Can someone please explain > all this to me? Found in F:\perl\5.8.3\lib\pod\perlfaq8.pod How do I install a module from CPAN? The easiest way is to have a module also named CPAN do it for you. This module comes with perl version 5.004 and later. > Thanks in advance, > Ali After you get the modules installed, Please take a look at the DateTime FAQ here: http://datetime.perl.org/faq.html Hope this helps. Ron Hill
RE: DateTime Subtraction
Hi Todd, Todd Goldenbaum wrote: > > I'm curious now though, what >is< $duration->days used for, > if not for expressing the length in days of a $duration? > >From the Docs: These methods return numbers indicating how many of the given unit the object represents, after having taken away larger units. The key here is "after having taken away larger units" using your example you were expecting the days unit to be set to 18 however, that can also be expressed as 2 weeks and 4 days. Which is what DateTime is doing: use strict; use warnings; use DateTime; use DateTime::Format::MySql; my $start_date = DateTime::Format::MySQL->parse_date( '2005-01-05' ); my $end_date = DateTime::Format::MySQL->parse_date( '2005-01-23' ); my $dur = $start_date->delta_days( $end_date ); print "Number of weeks is:",$dur->weeks ,"\n"; print "Number of days is:", $dur->days; prints F:\scripts>my.pl Number of weeks is:2 Number of days is:4 F:\scripts> So what is needed is a way to tell DateTime to convert all units to just one, in your case days. Hence the in_units method needs to be used. I hope this helps. Thanks Ron Hill
Should we add this to the FAQ (was:DateTime Subtraction)
Hi Dave, Dave Rolsky wrote: > On Tue, 25 Jan 2005, Hill, Ronald wrote: > > > Yeah, I noticed this too. It's a bug (the docs are right) and will be > fixed in the next release. > I checked the FAQ for this topic (delta_days)and did not find one. Do you think we should add this question to the FAQ? How do I find the different in to dates (or somethink like that) Thanks Ron Hill
RE: DateTime Subtraction
Hi Todd, Todd Goldenbaum wrote: > Hello, > > I'm trying to find the difference betwen two datetime > objects, but I'm > getting some unexpected results. I start with two dates out of mysql > (code simplified a bit for this example): > >my $start_date = DateTime::Format::MySQL->parse_date( '2005-01-05' >); my $end_date = DateTime::Format::MySQL->parse_date( > '2005-01-23' ); > > Then I use one of these two techniques to perform the subtraction: > >my $duration = $start_date->delta_days( $end_date ); > >my $duration = $end_date - $start_date; > > Expecting to get a $duration of 18 days. But with either technique, > the resulting $duration->days value is 4 instead of the expected 18. > And when I ask for $duration->hours, it gives me 0. > > Further experimentation with the two dates involved reveals that > subtracting two dates that are within a few days of each > other seems to > work, but at a certain point it breaks down and gives erroneous > results. Any idea what could be going on here? > > Thanks, > Todd There are a couple of ways to do this; use strict; use warnings; use DateTime; use DateTime::Format::MySql; my $start_date = DateTime::Format::MySQL->parse_date( '2005-01-05' ); my $end_date = DateTime::Format::MySQL->parse_date( '2005-01-23' ); my $dur = $end_date->delta_days( $start_date ); print $dur->delta_days; gives the correct result of 18 or using your example above my $duration = $end_date - $start_date; print $duration->in_units('days'); gives the same results. However, after checking the docs for this function. I found this: The C and C methods truncate the duration so that any fractional portion of a day is ignored. The C method converts any day and month differences to minutes. Unlike the subtraction methods, B. ^^^ but if I do thisuse strict; use warnings; use DateTime; use DateTime::Format::MySql; my $start_date = DateTime::Format::MySQL->parse_date( '2005-01-05' ); my $end_date = DateTime::Format::MySQL->parse_date( '2005-01-23' ); my $dur = $start_date->delta_days( $end_date ); if ($dur->is_positive) {print "it's positive\n"} if ($dur->is_negative) {print "it's negative\n"} print $dur->delta_days; I get this: F:\scripts>my.pl it's negative -18 Which is correct but does not match what the docs say. Anyway I hope this helps. Ron Hill
RE: Win32 testers for Time::Local?
Dave Rolsky wrote: > If some Win32 folks could grab the latest CVS version of Time::Local > and run the tests that'd be very helpful. > > > -dave G:\modules\Time-Local>perl makefile.pl Checking if your kit is complete... Warning: the following files are missing in your kit: META.yml Please inform the author. Writing Makefile for Time::Local G:\modules\Time-Local>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cp lib/Time/Local.pm blib\lib\Time\Local.pm G:\modules\Time-Local>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe "-MExtUtils::Command::MM" "-e" "test_har ness(0, 'blib\lib', 'blib\arch')" t\Local.t t\Localok 130/133Day too small - -24048 > 0 Sec too small - -24048 < 0 t\LocalNOK 131# Test 131 got: 'Cannot handle date (0, 0, 0, 29, 1, 1904) at t\Local.t line 147 ' (t\Local.t at line 148) # Expected: '' # t\Local.t line 148 is: ok($@, ''); t\LocalFAILED test 131 Failed 1/133 tests, 99.25% okay (less 24 skipped tests: 108 okay, 81.20%) Failed Test Stat Wstat Total Fail Failed List of Failed --- t\Local.t1331 0.75% 131 24 subtests skipped. Failed 1/1 test scripts, 0.00% okay. 1/133 subtests failed, 99.25% okay. NMAKE : fatal error U1077: 'F:\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe' : return code '0xff ' Stop. G:\modules\Time-Local>nmake test TEST_VERBOSE=1 Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe "-MExtUtils::Command::MM" "-e" "test_har ness(1, 'blib\lib', 'blib\arch')" t\Local.t t\Local1..133 # Running under perl version 5.008003 for MSWin32 # Current time local: Tue Jan 11 08:35:38 2005 # Current time GMT: Tue Jan 11 16:35:38 2005 # Using Test.pm version 1.24 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 ok 12 ok 13 ok 14 ok 15 ok 16 ok 17 ok 18 ok 19 ok 20 ok 21 ok 22 ok 23 ok 24 ok 25 ok 26 ok 27 ok 28 ok 29 ok 30 ok 31 ok 32 ok 33 ok 34 ok 35 ok 36 ok 37 ok 38 ok 39 ok 40 ok 41 ok 42 ok 43 ok 44 ok 45 ok 46 ok 47 ok 48 ok 49 ok 50 ok 51 ok 52 ok 53 ok 54 ok 55 ok 56 ok 57 ok 58 ok 59 ok 60 ok 61 ok 62 ok 63 ok 64 ok 65 ok 66 ok 67 ok 68 ok 69 ok 70 ok 71 ok 72 ok 73 ok 74 ok 75 ok 76 ok 77 ok 78 ok 79 ok 80 ok 81 ok 82 ok 83 ok 84 ok 85 ok 86 ok 87 ok 88 ok 89 ok 90 ok 91 ok 92 ok 93 ok 94 ok 95 ok 96 ok 97 # skip ok 98 # skip ok 99 # skip ok 100 # skip ok 101 # skip ok 102 # skip ok 103 # skip ok 104 # skip ok 105 # skip ok 106 # skip ok 107 # skip ok 108 # skip ok 109 # skip ok 110 # skip ok 111 # skip ok 112 # skip ok 113 # skip ok 114 # skip ok 115 # skip ok 116 # skip ok 117 # skip ok 118 # skip ok 119 # skip ok 120 # skip ok 121 ok 122 ok 123 ok 124 ok 125 ok 126 ok 127 ok 128 ok 129 ok 130 Day too small - -24048 > 0 Sec too small - -24048 < 0 not ok 131 # Test 131 got: 'Cannot handle date (0, 0, 0, 29, 1, 1904) at t\Local.t line 147 ' (t\Local.t at line 148) # Expected: '' # t\Local.t line 148 is: ok($@, ''); ok 132 ok 133 FAILED test 131 Failed 1/133 tests, 99.25% okay (less 24 skipped tests: 108 okay, 81.20%) Failed Test Stat Wstat Total Fail Failed List of Failed --- t\Local.t1331 0.75% 131 24 subtests skipped. Failed 1/1 test scripts, 0.00% okay. 1/133 subtests failed, 99.25% okay. NMAKE : fatal error U1077: 'F:\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe' : return code '0xff ' Stop. G:\modules\Time-Local>
[OT] CPAN coverage report What is it?
Hi All, Has anyone seen this: http://pjcj.sytes.net/cpancover/ What is it? and more importantly, what do the columns mean? Is this something the we (the developers) need to worry about? Thanks Ron Hill
RE: Windows PPM release?
Hi All, I guess I should chime in on this. Robert Eden wrote: > Has there been any progress on a windows PPM release? (or fixing > whatever problem the automated tool has) Hmn!! Automated tool :) I wish we had one :) Well, I have started something along the lines of an automated tool. It is by far no means ready for production but it kinda works. It took some time (to write the script) but I was able to generate ppm's for the following: (for perl 5.8.3) 04/14/2004 07:26a 603 DateTime-0.21.ppd 04/14/2004 11:15a 892 DateTime-Calendar-Chinese.ppd 04/14/2004 11:17a 634 DateTime-Calendar-Christian.ppd 04/14/2004 10:36a 516 DateTime-Calendar-Coptic.ppd 04/14/2004 10:04a 564 DateTime-Calendar-FrenchRevolutionary 04/14/2004 11:14a 531 DateTime-Calendar-Hebrew.ppd 04/14/2004 08:23a 486 DateTime-Calendar-Hijri-0.00.ppd 04/14/2004 11:15a 521 DateTime-Calendar-Japanese-Era.ppd 04/14/2004 11:15a 738 DateTime-Calendar-Japanese.ppd 04/14/2004 11:15a 473 DateTime-Calendar-Julian.ppd 04/14/2004 10:05a 519 DateTime-Calendar-Mayan.ppd 04/14/2004 11:13a 605 DateTime-Calendar-Pataphysical.ppd 04/14/2004 11:13a 707 DateTime-Event-Chinese.ppd 04/14/2004 10:36a 578 DateTime-Event-Cron.ppd 04/14/2004 11:13a 639 DateTime-Event-Easter.ppd 04/14/2004 10:36a 514 DateTime-Event-ICal.ppd 04/14/2004 11:17a 740 DateTime-Event-Lunar.ppd 04/14/2004 11:13a 681 DateTime-Event-NameDay.ppd 04/14/2004 08:29a 512 DateTime-Event-Random-0.03.ppd 04/14/2004 11:22a 514 DateTime-Event-Recurrence.ppd 04/14/2004 11:15a 691 DateTime-Event-SolarTerm.ppd 04/14/2004 11:15a 557 DateTime-Event-Sunrise.ppd 04/14/2004 11:15a 549 DateTime-Fiction-JRRTolkien-Shire.ppd 04/14/2004 10:36a 485 DateTime-Fiscal-Year.ppd 04/14/2004 11:15a 508 DateTime-Format-Bork.ppd 04/14/2004 11:14a 582 DateTime-Format-Builder.ppd 04/14/2004 11:16a 521 DateTime-Format-DateManip.ppd 04/14/2004 10:03a 513 DateTime-Format-DBI.ppd 04/14/2004 11:13a 479 DateTime-Format-Epoch.ppd 04/14/2004 11:15a 467 DateTime-Format-Excel.ppd 04/14/2004 11:13a 497 DateTime-Format-HTTP.ppd 04/14/2004 11:16a 710 DateTime-Format-ICal.ppd 04/14/2004 10:37a 524 DateTime-Format-ISO8601.ppd 04/14/2004 11:15a 709 DateTime-Format-Japanese.ppd 04/14/2004 10:04a 531 DateTime-Format-Mail.ppd 04/14/2004 10:04a 587 DateTime-Format-Pg.ppd 04/14/2004 11:13a 528 DateTime-Format-Roman.ppd 04/14/2004 11:14a 650 DateTime-Format-Strptime.ppd 04/14/2004 11:15a 472 DateTime-Format-W3CDTF.ppd 04/14/2004 08:25a 463 DateTime-Functions-0.01.ppd 04/14/2004 10:05a 466 DateTime-HiRes.ppd 04/14/2004 10:04a 575 DateTime-Incomplete.ppd 04/14/2004 10:38a 421 DateTime-Locale.ppd 04/14/2004 10:03a 398 DateTime-Precise.ppd 04/14/2004 08:30a 485 DateTime-Set-0.16.ppd 04/14/2004 10:36a 406 DateTime-Stringify.ppd 04/14/2004 10:36a 528 DateTime-TimeZone-Alias.ppd 04/14/2004 10:36a 459 DateTime-TimeZone-LMT.ppd 04/14/2004 11:16a 498 DateTime-TimeZone.ppd 04/14/2004 08:00a 597 DateTime-Util-Astro-0.02.ppd 04/14/2004 10:35a 584 DateTime-Util-Calc.ppd 04/14/2004 11:22a 407 DateTimeCron-Simple.ppd 04/14/2004 11:22a 455 DateTimeFormat-Duration.ppd Now, what can I do with these? I do not have a web page to put them on. Grant it this needs a lot of work, but it is a start. Comments, suggestions on how to proceed let me know. (I'm tried :( ) Thanks Ron Hill the script - use strict; use warnings; use LWP::UserAgent; use File::Basename; use HTML::LinkExtor; use URI::URL; use PPM::Make; #use Data::Dumper; my $base_dir= 'f:/datetime_dest'; my $dest_source = 'f:/datetime_dest/archive'; my $url = "http://cpan.org/modules/01modules.index.html";; my %module = get_datetime_modules($url); my @source_modules = get_files($dest_source); #get the difference between the two foreach my $filename(@source_modules) { if ( exists( $module{$filename} ) ) { delete $module{$filename}; } } #make the distro while ( my ( $filename, $urlpath ) = each(%module) ) { my $ppm = PPM::Make->new( dist => "$urlpath", vs => 'yes', ignore => 'yes', upload => {
Datetime-format-Datemanip-0.04 fails it's test
Hi All, I just tried to install the DateTime-Datemanip module and it fails it's tests Results below. Ron F:\perl_modules\DateTime-Format-DateManip-0.04>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe Build lib\DateTime\Format\DateManip.pm -> blib\lib\DateTime\Format\DateManip.pm Manifying blib\lib/DateTime/Format/DateManip.pm -> blib\libdoc\DateTime.Format.Dat F:\perl_modules\DateTime-Format-DateManip-0.04>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe Build test t\00load...ok t\01conversionsNOK 3# Failed test (t\01conversions.t at line 73) # got: '' # expected: '2003032303:00:00' t\01conversionsNOK 4# Failed test (t\01conversions.t at line 73) # got: '' # expected: '2003032315:00:00' t\01conversionsok 6/6# Looks like you failed 2 tests of 6. t\01conversionsdubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 3-4 Failed 2/6 tests, 66.67% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t\01conversions.t2 512 62 33.33% 3-4 Failed 1/2 test scripts, 50.00% okay. 2/7 subtests failed, 71.43% okay. NMAKE : fatal error U1077: 'F:\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe' : Stop. F:\perl_modules\DateTime-Format-DateManip-0.04>
RE: ANNOUNCE: Time::Local 1.09
Dave Rolsky wrote: > 1.092004-04-07 > > - Fixed a bug in the test suite that led to timegm not getting tested > properly, and timelocal getting tested twice for the same values. > testing on Win32 produces a lot of warnings [sample below] Use of uninitialized value in integer addition (+) at F:\perl_modules\Time-Local-1.09\blib\lib/Time/ Local.pm line 67. t\Localok 101/102Use of uninitialized value in integer addition (+) at F:\perl_modules\Time-Loca l-1.09\blib\lib/Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at F:\perl_modules\Time-Local-1.09\blib\lib /Time/Local.pm line 76. Use of uninitialized value in integer multiplication (*) at F:\perl_modules\Time-Local-1.09\blib\lib /Time/Local.pm line 76. Use of uninitialized value in pack at F:\perl_modules\Time-Local-1.09\blib\lib/Time/Local.pm line 67 . Use of uninitialized value in pack at F:\perl_modules\Time-Local-1.09\blib\lib/Time/Local.pm line 67 . Use of uninitialized value in integer addition (+) at F:\perl_modules\Time-Local-1.09\blib\lib/Time/ Local.pm line 67. t\Localok All tests successful. Files=1, Tests=102, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) Tested on HPUX produces none at all $ make cp lib/Time/Local.pm blib/lib/Time/Local.pm Manifying blib/man3/Time::Local.3 $ make test PERL_DL_NONLAZY=1 /app/perl5.8.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/Localok All tests successful. Files=1, Tests=102, 1 wallclock secs ( 0.27 cusr + 0.04 csys = 0.31 CPU) Hope this helps Ron Hill
RE: Latitude/Longitude to Olsen timezone name
Ed Perrone wrote: > I am working on an application where the user will input a > date, time, and location, and I will need to convert > that time into the equivalent GMT. > This means I will need to locate the input data within > one of the Olsen time zones in order to create and manipulate a > Date::Time object. > > Unfortunately, "city/province/nation" or "latitude/longitude" > don't seem to convert easily into the time zone names > used in Date::Time. [snipped] I had a similar problem with developing tests for the sunrise module. There is no easy way to do a reverse lookup using DateTime/Olson, However, you can generate an offset value to use for your time conversion (based on Long./Lat). For every 15 degrees west of the prime meridian you will lose one hour, ( conversely every 15 degrees east you will gain one hour) so you can take the Longitude you receive and compute the offset. From there you can use the DateTime::TimeZone::offset_as_string method to generate a DateTime object. Using this method I'm not sure if the DateTime object will apply the DST conversion. To get a better idea of what I did please see the 01basic.t file (for the DateTime::Event::Sunrise module) I hope this helps. Ron Hill
RE: Template::Plugin::DateTime
Hi Daisike, Daisuke Maki wrote: > I'd like to use DateTime object from within the Template-Toolkit, so I > hacked this up. Feedback welcome. > You might want to post to the template toolkit mailing list on this one. [EMAIL PROTECTED] I'm sure they would want to know about this. I hope the move went well :) Ron Hill
RE:DateTime-Event-Sunrise-0.05 Problem...
> I am trying to get DateTime-Event-Sunrise-0.05 to work on > Windows 2000 with Perl 5.6.1 and I am getting this error. > Can't locate loadable object for module DateTime in @INC (@INC contains: D:/Perl > /lib D:/Perl/site/lib .) at D:/Perl/lib/XSLoader.pm line 43 > BEGIN failed--compilation aborted at D:/Perl/lib/DateTime.pm line 43. > Compilation failed in require at Sun.pl line 1. > BEGIN failed--compilation aborted at Sun.pl line 1. Judging from the error you do not have the c portion of the DateTime module installed. > I have manually installed DateTime and DateTime-Event-Sunrise > to the D:\Perl\lib directories. This is NOT how you install perl modules (hence the errors you are encountering) generally, you need to do (at the command prompt) perl Makefile.PL nmake nmake test nmake install > Do you have any ideas of what I am missing? > Thanks - MJ Try reinstalling the DateTime module as stated above. If you still have problems please report it on the datetime mailing list [EMAIL PROTECTED] Thanks for using DateTime Ron Hill
RE: ANNOUNCE: DateTime::Set 0.1406
Flavio S. Glock wrote: > DateTime::Set 0.1406 is in CVS. [snipped] > > Version 0.15 will have to wait until I find out > how to deal with backwards incompatibilities: > > DateTime::Set versions after 0.1402 break some > DateTime::Event modules, with an infinite loop inside the "next()" > method. I have updated the Sunrise module to reflect this change. The current version of Sunrise now depends on the DateTime-Util- Calc module provided by Daisuke. I have checked the CVS and he has not incorporated the changes I have requested. ( Not his fault he is in the process of an internationl move and I have not written any tests for the requested changes (shame on me) ). Anyway, If anyone needs to test let me know. Thanks Ron Hill
RE: Converting the sunrise module to use DateTime-util-calc
Hi Daisuke, Daisuke Maki wrote: > I'm fairly sure this is ok, but as I did it in such a hurry, can you > just download this and double check for me before I upload it to CPAN? > >http://www.wafu.ne.jp/~daisuke/DateTime-Util-Calc-0.03.tar.gz > Wait!!! I was going to ask you to add some functions to this module. like: sub atan2d { ( $RADEG * atan2( $_[0], $_[1] ) ); } sub revolution { # # # FUNCTIONAL SEQUENCE for revolution # # _GIVEN # any angle # # _THEN # # reduces any angle to within the first revolution # by subtracting or adding even multiples of 360.0 # # # _RETURN # # the value of the input is >= 0.0 and < 360.0 # my $x = $_[0]; return ( $x - 360.0 * floor( $x * $INV360 ) ); } sub rev180 { # # # FUNCTIONAL SEQUENCE for rev180 # # _GIVEN # # any angle # # _THEN # # Reduce input to within +180..+180 degrees # # # _RETURN # # angle that was reduced # my ($x) = @_; return ( $x - 360.0 * floor( $x * $INV360 + 0.5 ) ); } The names can be whatever you like (as long as I know what they are). I will download and test and let you know > BTW, DT::U::Calc uses Math::BigFloat's, which are > significantly slower > than just straight forward calculation. is that okay with you? As long as it works :) Ron Hill > > Daisuke Maki wrote: > >> >> That would be because I'm stupid and blindly copied sin_deg(), >> cos_deg() to asin_deg() and acos_deg(). >> >> Fix coming... >> >> --d
Converting the sunrise module to use DateTime-util-calc
Hi All, I am in the process of converting the DateTime-Event-Sunrise module to use the DateTime-util-calc module. The problem I am having is using the acos_deg function in the cals module does not product the same results as my acosd function. Can someone tell me how I can get these 2 functions to agree? Am I doing something wrong? the output is: F:\scripts>me.pl t using my method: 76.1440743101727 t using util method: 1.56661657821494 F:\scripts> Here is a test script to demonstrate the problem. use strict; use warnings; use Math::Trig; use DateTime::Util::Calc qw(acos_deg); my $RADEG = ( 180 / pi ); my $cost = 0.239481255754665; my $t = acosd($cost); my $z = acos_deg($cost); print "t using my method: $t\n"; print "t using util method: $z\n"; sub acosd { ( $RADEG * acos( $_[0] ) ); } __END__ from Pauls c code whis is what I use in my module #define RADEG ( 180.0 / PI ) #define DEGRAD( PI / 180.0 ) /* The trigonometric functions in degrees */ #define sind(x) sin((x)*DEGRAD) #define cosd(x) cos((x)*DEGRAD) #define tand(x) tan((x)*DEGRAD) #define atand(x)(RADEG*atan(x)) #define asind(x)(RADEG*asin(x)) #define acosd(x)(RADEG*acos(x)) #define atan2d(y,x) (RADEG*atan2(y,x)) Thanks Ron Hill
RE: DateTime::Calendar::Japanese 0.03 - problem _new from DateTim e::Event::Sunrise
Daisuke Maki wrote: > Or, am I suppose to use the sunrise_sunset_span? > I think so. fixin'... > > --d [snipped] Yes, use that method, the start will be the rise time and the end will be the set time. Ron
RE: DateTime::Calendar::Japanese 0.03 - problem _new from DateTim e::Event::Sunrise
[EMAIL PROTECTED] wrote: > Summary of the problem: > > Creating new 'Build' script for 'DateTime-Calendar-Japanese' version > '0.03' Running [/usr/perl/v5.8.3/bin/perl Build UNINST=1]... > lib/DateTime/Calendar/Japanese.pm -> > blib/lib/DateTime/Calendar/Japanese.pm > Manifying blib/lib/DateTime/Calendar/Japanese.pm -> > blib/libdoc/DateTime::Calendar::Japanese.3 > Running [/usr/perl/v5.8.3/bin/perl Build UNINST=1 test]... > t/01-sanity > *** This test will take a long time, please be patient *** > *** Starting on Thu Feb 5 12:52:14 2004 > Can't locate object method "_new" via package > "DateTime::Event::Sunrise" at [snipped] Oooops!, I did not note that in the change log :( Anyway, Daisuke Maki needs to update his module to use the new method as there is no more _new and update the dependencies as will. Sorry about that :( Ron Hill
RE: date time support for win32
Dave Rolsky wrote: > On Fri, 30 Jan 2004, Hill, Ronald wrote: > >> I think it is time that we do come up with a standard way >> of shipping out modules. ( Module-Build or makemaker)It sure >> would make installing DateTime modules much simpler. > > It would? Why? As long as the Module::Build using distros provide a > passthrough Makefile.PL, CPAN or CPANPLUS will work no matter what. Actually, I was refering to the person/script that would be building the PPM's If everyone used say Module-build would'nt be easier to write a script to build everything? (maybe/maybe not) CPAN does not work on Windows (At least I could not get it to work) I have not tried CPANPLUS > > The real problem seems to be PPMs. Does standardizing on one M::B vs > EU::MM make a difference for PPMs? > I don't think so, I have build ppm's for DateTime-Timezone using Module-Build and it works :)
RE: date time support for win32
Dave Rolsky wrote: > On Fri, 30 Jan 2004, Hill, Ronald wrote: > [snipped] >> failed building DateTime-Locale prerequisite YAML >> aborting build of DateTime-Locale: failed prerequisites > > DT::Locale doesn't need YAML! WTF?! Don't ask me :) > > It includes a META.yml file, courtesy of Module::Build, but so do > many other modules. > >> I checked the Module::Build status and it is listed as >> fail. (no reason why) > > This may be the real problem. I got this module to build for me :) I did have a problem building ExtUtils-ParseXS on 5.6.1 & 5.8.0 (if I remember correctly) But this was fixed when 5.8.1 was released. This was the reason I never generated PPM's for perl 5.6.1 As it stands right now I can build DateTime for perl 5.8.3 without problems. Does this mean the the modules will run on 5.8.0? I really don't know what to do about 5.6.1 > >> I also noticed that some of the modules in DateTime use >> module-build and others use the MakeMaker method. >> Which one should we use? Is there a standard? > > Well, I think Module::Build is definitely the way to go, but > I don't want to force anyone to use it. I've used it > for most of my modules on CPAN, I think it is time that we do come up with a standard way of shipping out modules. ( Module-Build or makemaker)It sure would make installing DateTime modules much simpler. I personally don't care which one we use as long as everyone agrees. > with the exception of DateTime.pm and older ones I've not yet > converted. I've been meaning to convert DateTime.pm as well, though I > may wait til > the XS compilation pieces of Module::Build are known to work on Win32. > I think it does work. I am currently using it (see above) Thanks Ron
RE: date time support for win32
Dave Rolsky wrote: > On Fri, 30 Jan 2004, Hill, Ronald wrote: > [snipped] >> This all works (now!!) I was having major problems creating >> the archive. It seems that Archive-tar-1.08 did the trick :) >> >> What about the versions of perl? 5.004, 5.6.1, 5.8.0, 5.8.3 ? > > But doesn't ActiveState already do this for a number of modules, for > multiple Perl versions? Yes they do 5.6.0 and the current perl version > Why isn't DateTime included? It is, and they all fail to build > I think it had > something to do with Params::Validate not compiling for them? I check the build results for the current perl version for DateTime failed building DateTime prerequisite DateTime-Locale aborting build of DateTime: failed prerequisites Checked results for DateTime-locale failed building DateTime-Locale prerequisite YAML aborting build of DateTime-Locale: failed prerequisites checking YAML and found That is passed ! YAML 0.35 PASS PASS PASS PASS PASS PASS PASS Hmn! This does not make sence. I checked the Module::Build status and it is listed as fail. (no reason why) I don't know why Activestate is having problems building DateTime. I was able to do it. I also noticed that some of the modules in DateTime use module-build and others use the MakeMaker method. Which one should we use? Is there a standard? Ron
RE: date time support for win32
Christian Hansen wrote: > Rick Measham wrote: >> I'm a windows no-nothing. But can't we 'make ppm' from the distros? >> If so, I can easily automate that. I'll set a script to download >> each modules that's uploaded and make ppm on each of them. >> >> However I'm betting it's not really that easy huh? > > It´s pretty straight forward, > > perl Makefile.PL > nmake > nmake test > nmake ppd > tar -cf DateTime-VERSION.tar blib > gzip --best DateTime-Version.tar > > perl -pi.bak -e "s|HREF=\"\"|HREF=\"DateTime.tar.gz\"|" DateTime.ppd And for the modules that use module build we would need perl Makefile.pl perl build perl build test perl build dist perl build ppd This all works (now!!) I was having major problems creating the archive. It seems that Archive-tar-1.08 did the trick :) What about the versions of perl? 5.004, 5.6.1, 5.8.0, 5.8.3 ? Ron
[Announce] Datetime-Event-Sunrise-0.05 on CVS
Hi All, I just updated DateTime-Event-Sunrise on CVS to include the new methods sunrise_sunset_span, sunrise_datetime, sunset_datetime. Example: (per Flavio) my $sun = DateTime::Event::Sunrise->new( longitude =>'-118' , latitude => '33' ); my $dt1 = $sun->sunrise_datetime( $dt ); print "Sunrise is:" , $dt1->datetime , "\n"; my $dt2 = $sun->sunset_datetime( $dt ); print "Sunset is:" , $dt2->datetime , "\n"; my $dt_span = $sun->sunrise_sunset_span( datetime => $dt ); print "Sunrise is:" , $dt_span->start->datetime , "\n"; print "Sunset is:" , $dt_span->end->datetime , "\n"; I should release to CPAN in a few days. Thanks Ron Hill
RE: [Announce] updated version of DateTime::Event::Sunrise on CVS
Flavio S. Glock wrote: > Hill, Ronald wrote: >> >> Hi All, >> >> I have just updated the DateTime::Event::Sunrise package on >> CVS. I have added a new method sunrise_sunset (and a new method). [snipped] > > Is this too verbose? > > my $dt_span = $sunrise->sunrise_sunset_span( datetime => $dt ); > print "Sunrise is:" , $dt_span->start->datetime , "\n"; > print "Sunset is:" , $dt_span->end->datetime; Ok, easy enought to fix. > > my $dt_set = $sunrise->sunrise_set( %optional_parameters ); > my $dt_set2 = $sunrise->sunset_set( %optional_parameters ); I don't understand this? > > my $dt = $sunrise->sunrise_dt( datetime => $dt ); > my $dt2 = $sunrise->sunset_dt( datetime => $dt ); Ok, I will add another method for this. Thanks Flavio Ron Hill
[Announce] updated version of DateTime::Event::Sunrise on CVS
Hi All, I have just updated the DateTime::Event::Sunrise package on CVS. I have added a new method sunrise_sunset (and a new method). Basically, it will return a DateTime Span containing the rise/set times. Example: use DateTime; use DateTime::Event::Sunrise; use strict; use warnings; my $dt = DateTime->new( year => 2000, month => 6, day=> 20, time_zone => 'America/Los_Angeles', ); my $sunrise = DateTime::Event::Sunrise ->new( longitude =>'-118' , latitude => '33', ); my $tmp = $sunrise->sunrise_sunset($dt); print "Sunrise is:" , $tmp->start->datetime , "\n"; print "Sunset is:" , $tmp->end->datetime; If I don't hear any complains I will release to CPAN next week as version 0.05. Thanks Ron Hill
Help with generating a Datetime set using the from_datetime metho d
Hi Flavio, I'm stuck :( I am trying to implement the changes that were discussed recently on the list and am running into problems. Here is what I have tried: I have renamed the currect sunrise_sunset to _sunrise_sunset (easy) then I wrote a new sunrise_sunset sub to accommodate the change request. Here is what I have: sub sunrise_sunset { my $class = shift; my $self = $class->_new( @_ ); return DateTime::Set->from_datetimes( dates => sub { $self->_current_rise_set->($_[0]); } ); } Then I wrote another sub ( _current_rise_set) That has the following sub _current_rise_set { my $self = shift; my $dt = shift; croak( "Dates need to be DateTime objects (" . ref($dt) . ")" ) unless ( $dt->isa('DateTime') ); my ( $tmp_rise, $tmp_set ) = _sunrise( $self, $dt ); return [$tmp_rise, $tmp_set] ; } The idea is that I want to keep the current overall structure of the module. In order to do this I though that all I needed to do was to have the module return (as a set) the date of rise/set. So the users of the module would do something like this: #!/usr/bin/perl use strict; use warnings; use DateTime; use DateTime::Event::Sunrise: my $dt = DateTime->new( year => 2003, month => 12, day=> 01, time_zone => 'America/Los_Angeles', ); my $sun_set = DateTime::Event::Sunrise ->sunrise_sunset( longitude =>'-118' , latitude => '33', ); then to generate the DateTime Set do this my $dt_set = $sun_set->($dt); Well, needless to say this does not work :( The reason is because the from_datetimes method does not accept a coderef (only an arrayref) Even if it did I still don't think it would work. Is there a reason it only accepts a arrayref? ( it would be kinda cool if it did accept a coderef). Anyway, if there is any insite you can provide it would be most helpful. Thanks Ron Hill
RE: I need help creating a custom Date parser
Hi Rick, > > On Tue, 9 Dec 2003 12:29:33 -0800 , Hill, Ronald wrote > > my $dt = DateTime::Format::UGAnswer->parse_date('Jan 26 2001'); > > > > print $dt->mdy; > > > > I have tried messing with this line in the package > > strptime => '%B%N%d%N%Y' in order to get it to work but nogo > > %N is nanoseconds. You might want to look at %n, except that Ops!!, yep that works :) > it's not backwards > compatible in that $dt->strptime('%B%N%d%N%Y'') will return newlines: > Jan > 26 > 2001 > > If you know that the string is 10 characters long, then I'd > just used vanila spaces in your > pattern: > '%B %d %Y' That is what I tried and it works. However, I did take out the length requriment so I can have: $dt = DateTime::Format::UGAnswer->parse_date('January 26 2001'); as well. Seems to work :) Thanks Ron Hill
I need help creating a custom Date parser
Hi All, I am kinda stuck creating a DateTime parser. The dates I am trying to parse are: 06/26/98 06-26-98 Jun 26 1998 Jun 26 98 I have the first two done and working but the third and forth is giving me fits :( Here is what I have tried; I created a new package like so, package DateTime::Format::UGAnswer; use DateTime; use DateTime::Format::Builder ( parsers => { parse_date => [ { length => 8, strptime => '%m-%d-%y', }, { length => 8, strptime =>'%m/%d/%y', }, { length => 10, strptime => '%m/%d/%Y', }, { length => 10, strptime => '%m-%d-%Y', }, { length => 11, strptime => '%B%N%d%N%Y', }, ], }, ); sub format_date { my ( $self, $dt ) = @_; return $dt->ymd('-'); } 1; and my test script looks like this: use strict; use warnings; use lib qw(f:/scripts); use DateTime; use DateTime::Format::UGAnswer; my $dt = DateTime::Format::UGAnswer->parse_date('Jan 26 2001'); print $dt->mdy; I have tried messing with this line in the package strptime => '%B%N%d%N%Y' in order to get it to work but nogo the error is F:\scripts>y.pl Invalid date format: Jan 26 2001 at F: . Can someone provide insite as to what I am doing wrong? Thanks Ron Hill
RE: Mapping an offset to a datetime timezone
Hi Dave, > > On Wed, 5 Nov 2003, Hill, Ronald wrote: > > > I have recently updated the test scripts for the > > Astro::Sunrise module and would like to incorporate these > > changes into the DateTime::Event::Sunrise test suite. However, > > I am unable to map an offset into a datetime timezone. Is > > there a way to take an offset say -8 hours and look this up > > and know that this is America/Los_Angeles timezone? > > Dave Wrote: > > No, because there's plenty of timezones for every offset. > For example, at > -08:00 base offset from UTC we have America/Los_Angeles, > America/Juneau, > America/Whitehorse, America/Dawson, America/Tijuana, and > America/Vancouver. > > So which one of those corresponds to -8 hours? > I kinda figured it would be like that (It does'nt hurt to ask). However, I was able to figure out what I need to do: I am using the offset_as_string method from DateTime::TimeZone module to set it. Now I just need to figure out how to round either up or down to the nearest minite. I will post the script to the group when I am done :) Thanks Ron Hill
Mapping an offset to a datetime timezone
Hi All, I have recently updated the test scripts for the Astro::Sunrise module and would like to incorporate these changes into the DateTime::Event::Sunrise test suite. However, I am unable to map an offset into a datetime timezone. Is there a way to take an offset say -8 hours and look this up and know that this is America/Los_Angeles timezone? Thanks Ron Hill
[OT] Anyone attending Comdex/Apachecon 2003?
Hi All, I was just wondering if anyone on the list is planning to attend Comdex/Apachecon 2003? Ron Hill
RE: Availability of pre-built ActiveState installation?
[text rearranged for Datetime archive] > > > <[EMAIL PROTECTED]> wrote: > > > Guys, > > > > > > > > > I was wondering if anyone had a pre-built ActiveState > > > implementation of DateTime and its dependants. I have > > > <[EMAIL PROTECTED]> wrote: > [snipped] > What version of perl? I have the ppd's for version 5.8.0. > Just let me know if you want them. (they are kinda outdated) > > <[EMAIL PROTECTED]> wrote: > > >Hiya Ronald, > > > > Perl 5.8.0 versions would be just fine, thanks. You say they > > > are somewhat outdated, yet isn't that the most recent > > > ActiveState release? > > > > Thanks. > > > Kev. > <[EMAIL PROTECTED]> wrote: > Actually, I was refering to the modules themselves. I created > these PPM's about 3 months ago. (some of the modules have changed > since I created them). > Anyway, here they are. > Ron Hill > <[EMAIL PROTECTED]> wrote: > > > <[EMAIL PROTECTED]> wrote: > > > > > > I don't suppose you have a ppd for the > > > DateTime-Format-Strptime package, do you? > > No, sorry :( > > > > I have built one from my build, but am a little concerned > > > that it won't be good. I guess I can test it and see how it goes. > > > That should work :) > > Ron > > > <[EMAIL PROTECTED]> wrote: > > > >Ronald, > > > > When I type "ppm install *.ppd" in the directory that > > > contains the ppd and .tar.gz files you sent, it complains > > > that it cannot access the repositories. This is because the > > > machine is not attached to the internet. I disabled both > > > active repositories and now it says that it cannot install > > > because there are no repositories, despite the fact that the > > > required .tar.gz files are in the current directory. Do you > > > have any idea how to make it look there? > > > > Thanks. > > > K. Hi Kevin, set repository NAME LOCATION - Adds a repository to the list of PPD repositories for this session. 'NAME' is the name by which this repository will be referred; 'LOCATION' is a URL or directory name. Try this. Hope this helps Ron Hill
RE: Availability of pre-built ActiveState installation?
Hi Kevin, > > > Guys, > > > I was wondering if anyone had a pre-built ActiveState > implementation of DateTime and its dependants. I have [snipped] What version of perl? I have the ppd's for version 5.8.0. Just let me know if you want them. (they are kinda outdated) Ron Hill
RE: [Kinda OT] Could somebody double check this?
Hi Maki, [snipped] [Ronald Hill Wrote] > > This is correct, there was talk of doing this however, it > > is not easy. The last I heard, there was work on getting > > the SLA library released under the LGPL. > > (hopefully this will include a windows port of the library) > > This library has all of the functions needed for lunisolar > > calenders. > [Maki Daisuke Wrote] > Is this going to happen anytime soon, or is it just an idea floating > around? If it's going to take a while, I might just go ahead > and take a stab at it anyway. > > --d I have no idea how long this will take. I just checked my archives and it seems that the SLALIB is lgpl'ed (fortran version only). The only problem with this is that not many people have a fortran compiler for windows :( Anyway, I think you should take a stab at it. I did at one time create a sun position perl module ( I was working with Henry Sobotka on this) However, I have not done any work on it for quite some time. I hope this helps. Ron Hill
RE: [Kinda OT] Could somebody double check this?
Hi Maki, > > Hi, dt-ers. > > I've been lurking on this list for some time now, and so far I > understand that while a few people have attempted, nobody has come up > with a lunar, solar, or lunisolar calenders (at least I don't remember > seeing it on this list). This is correct, there was talk of doing this however, it is not easy. The last I heard, there was work on getting the SLA library released under the LGPL. (hopefully this will include a windows port of the library) This library has all of the functions needed for lunisolar calenders. Ron Hill
[Announce] DateTime-event-sunrise 0.0401 committed to CVS
Hi All, I have just committed changes to the sunrise module for preserving the timezone information. I have to confess I do not like how I had to do it :( Here is how I have changed the _sunrise sub my $rise_time = $tmp_dt1 + $rise_dur; my $set_time = $tmp_dt1 + $set_dur; my $tz = $dt->time_zone; $rise_time->set_time_zone($tz) unless $tz->is_floating; $set_time->set_time_zone ($tz) unless $tz->is_floating; return ( $rise_time, $set_time ); This will not preserve the class information, I tried Flavio's suggestion of my $tmp_dt1 = $dt-> clone-> set_time_zone( 'UTC' )-> truncate( to => 'day' ); instead of creating a new object however, I was always getting the incorrect date returned. So I reverted back to creating a new object and setting the timezone of the new object. Thanks Ron Hill
RE: DT-subtraction bugs in DT::F::Excel and DT::Event::Sunrise
Hi Dave, > > > On Tue, 7 Oct 2003, Hill, Ronald wrote: > > > Thanks for that!! I just started looking at the sunrise module > > to do some updates for preserving the timezone. > > > > I just installed the new release of DateTime 0.1704 > > and all tests now pass for sunrise :) > > 0.1704 is really broken so try it again with 0.1705 just to > make sure ;) > Oh dear!! I have installed the new DateTime update and tests for sunrise fail :( the 04 version was working. Here is the results F:\perl_modules\DateTime-0.1704>perl makefile.pl Testing if you have a C compiler Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cl /c test.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved. test.c Checking if your kit is complete... Looks good Writing Makefile for DateTime F:\perl_modules\DateTime-0.1704>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cp lib/DateTime.pm blib\lib\DateTime.pm cp lib/DateTimePP.pm blib\lib\DateTimePP.pm cp lib/DateTime/Duration.pm blib\lib\DateTime/Duration.pm cp lib/DateTimePPExtra.pm blib\lib\DateTimePPExtra.pm cp lib/DateTime/Infinite.pm blib\lib\DateTime/Infinite.pm cp lib/DateTime/LeapSecond.pm blib\lib\DateTime/LeapSecond.pm F:\perl\bin\perl.exe F:\Perl\lib\ExtUtils/xsubpp -typemap F:\Perl\lib\ExtUtils\typemap eTime.xs > DateTime.xsc && F:\perl\bin\perl.exe -MExtUtils::Command -e mv DateTime.xsc DateTime.c cl -c-nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYP DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -DNDEBUG -O1 VERSION=\"0.1704\" -DXS_VERSION=\"0.1704\" "-IF:\Perl\lib\CORE" DateTime.c DateTime.c DateTime.xs(129) : warning C4244: '=' : conversion from 'double ' to 'long ', possible loss of da "Running Mkbootstrap for DateTime ()" F:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 DateTime.bs F:\perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"DateTime\", 'DLBASE > 'DateTime', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\DateTime\DateTime.dll -dll -nologo -nodefaultlib -release -libp :"C:\Perl\lib\CORE" -machine:x86 DateTime.obj F:\Perl\lib\CORE\perl58.lib oldnames.lib kernel3 ib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.li netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.l -def:DateTime.def Creating library blib\arch\auto\DateTime\DateTime.lib and object blib\arch\auto\DateTime\DateT .exp F:\perl\bin\perl.exe -MExtUtils::Command -e chmod 755 blib\arch\auto\DateTime\DateTime.dl F:\perl\bin\perl.exe -MExtUtils::Command -e cp DateTime.bs blib\arch\auto\DateTime\DateTi bs F:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 blib\arch\auto\DateTime\DateTime.bs F:\perl_modules\DateTime-0.1704>nmake install Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Skipping F:\Perl\site\lib\auto\DateTime\DateTime.bs (unchanged) Installing F:\Perl\site\lib\auto\DateTime\DateTime.dll Installing F:\Perl\site\lib\auto\DateTime\DateTime.exp Installing F:\Perl\site\lib\auto\DateTime\DateTime.lib Installing F:\Perl\site\lib\DateTime.pm Skipping F:\Perl\site\lib\DateTimePP.pm (unchanged) Skipping F:\Perl\site\lib\DateTimePPExtra.pm (unchanged) Installing F:\Perl\site\lib\DateTime\Duration.pm Skipping F:\Perl\site\lib\DateTime\Infinite.pm (unchanged) Skipping F:\Perl\site\lib\DateTime\LeapSecond.pm (unchanged) Writing F:\Perl\site\lib\auto\DateTime\.packlist Appending installation info to F:\Perl\lib/perllocal.pod F:\perl_modules\DateTime-0.1704>g: G:\>cd modules G:\modules>cd datetime-event-sunrise G:\modules\DateTime-Event-Sunrise>perl makefile.pl Checking if your kit is complete... Looks good Writing Makefile for DateTime::Event::Sunrise G:\modules\DateTime-Event-Sunrise>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cp lib/DateTime/Event/Sunrise.pm blib\lib\DateTime/Event/Sunrise.pm G:\modules\DateTime-Event-Sunrise>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', '
RE: DT-subtraction bugs in DT::F::Excel and DT::Event::Sunrise
Hi Eugene, > Neither DateTime::Format::Excel nor DateTime::Event::Sunrise > pass their own tests. They were both broken when the > subtraction in DateTime changed, from returning > days and seconds to returning y,m,d, h,m,s. > > DT::E::Sunrise uses the subtraction in its function > days_since_2000_Jan_0(), and DT::F::Excel in format_datetime(). Both > then call delta_days to see how many days have passed; this is now > broken. Thanks for that!! I just started looking at the sunrise module to do some updates for preserving the timezone. I just installed the new release of DateTime 0.1704 and all tests now pass for sunrise :) Thanks Ron Hill
RE: DateTime Problem with nmake test
Hello, > # New locale: it > # Failed test (t\20infinite.t at line 61) > # got: '-2147483648' > # expected: '2147483648' > # Failed test (t\20infinite.t at line 61) > # got: '-2147483646' > # expected: '2147483648' > # Looks like you failed 2 tests of 39. > Failed 1/26 test scripts, 96.15% okay. 2/1494 subtests > failed, 99.87% oka > NMAKE : fatal error U1077: 'D:\Perl\bin\perl.exe' : return code '0xff' > Stop. This is a known problem :( No known workaround :( Ron Hill
RE: DateTime::Event::Sunset problems
Hi Matt, [snipped] > > My bad! Sorry about that. > > Although, I was referring to *all* event modules, or modules > that return sets, not just DTE::Sunset. I'm not sure if there are any > other modules that drop into UTC mode by default, however. I think this would depend on the function of the module. I took a quick look at the easter module. Rich has: return DateTime->new(year=>$year, month=>$month, day=>$day); notice he is not setting the time zone, not that it matters since it is only year,month, day no need to set the time zone. However, for sunrise/set it matters a great deal since all of the calculations depend on UTC time. As for sunrise it's up to the group as to what to do. [see my other post on this] Thanks Ron Hill
RE: Install Problem with DateTime.pm
Hello, [snipped] > > I'm stumped.. > > I have a problem installing DateTime.pm. I get a LNK1106 & > U1077 with the 'nmake' command. The messages for PERL- V and > 'nmake' are below. I am using Windows XP and VC++ 5 > > I have plenty of available space on my hard drive and there > are no integrity problems. > > I have searched google and found some references to upgrading > to VC++ 6 would solve the problem, but before I spend the > cash, I would like some conformation of that. > > Has anyone encountered this problem before? Got a solution? [much snippage] It seems that you are running the activestate version of perl. The question now is did you install the precomiled version of perl or did you download the source and build perl yourself? If you installed the prebuild version of activestate perl then you need to use the VC++ 6 to build your modules. You can use ppm to install the DateTime modules unfortunately, I have not built them yet [for that version of perl] :( Ron Hill
RE: DateTime::Event::Sunset problems
Hi Flavio & Dave, > > Dave Rolsky wrote: > > > > On Wed, 24 Sep 2003, Flavio S. Glock wrote: > > > > > sub _following_sunrise { > > > [ ... initialize ...] > > > my $tz = $dt->time_zone; > > > my $loc = $dt->locale; > > > [ ... some calculations ... ] > > > $tmp_rise->set_time_zone( $tz ); # unless > $tz->is_floating ??? > > > $tmp_rise->set_locale( $loc ); > > > return $tmp_rise; > > > } > > > > It's probably ok to set the time zone even if the given DT is in the > > floating time zone. > > No, converting from UTC to floating would give the same "unexpected" > results. > > How about adding ( localtime - gmtime ) before converting to floating? I think we are making this harder that it needs to be. First off, do you think it would be better to add these things in the _sunrise subroutine? This is where I have created the new DT object. my $rise_dur = DateTime::Duration->new( hours => $hour_rise, minutes => $min_rise); my $set_dur = DateTime::Duration->new( hours => $hour_set, minutes => $min_set); my $tmp_dt1 = DateTime->new( year => $dt->year, month => $dt->month, day => $dt->day, hour => 0, minute=> 0, time_zone => 'UTC' ); my $rise_time = $tmp_dt1 + $rise_dur; my $set_time = $tmp_dt1 + $set_dur; return ( $rise_time, $set_time ); I would set the time zone after I have added/subtractd the duration to get the rise/set times. As for floating time zones I say leave it at UTC and document it. just my 2 cents!! Ron Hill
RE: DateTime::Event::Sunset problems
Hi Matt, > > [snipped] > > If not, at least make sure that the module clearly states the > UTC behavior. > > Matt > It does, from the POD See DateTime::Set. =head2 ($sunrise, $sunset) = $sunrise_object->($dt); Internal method. Returns two DateTime objects sunrise and sunset. Please note that the time zone for these objects is set to UTC. So don't forget to set your timezone!! =head1 AUTHOR Ron Hill
RE: figuring out the number of sundays in a given year
Hi Syamala, > Here is a simple solution (unless you are bent on doing > it in a longer way using the class in ref.) The project I have started on is using DateTime for other things, so I figured I would use it here as well. Besides I don't think what I wrote is doing it the long way, granted I did screw up by passing in params to a method that was ignoring it. But I still got what I wanted. > sub jan1{ > my $y = shift; > my $m = 1; $d = 1; ^^ why is that there? and I don't understand why you set $m to 1 and then set it to 11? > $m = 11; $y--; > my $c = int($y / 100); $yy = $y %100; > my $z = ( 1 + $yy + int($yy/4) + int($c/4) - 2*$c) % 7; > $z += 7 if $z < 0; > return $z; # 0 ==> Sun day. 6 ==> Sat. day. >} >sub sundays{ > my $year = shift; > my $j1st = jan1($year); > return 53 if $j1st == 0 || ($j1st == 6 && jan1($year+1) == 1); >return 52; >} Ron Hill
RE: figuring out the number of sundays in a given year
Hi Josh, > > Hi Ron, > > I'm a bit confused by your parameters to day_of_week(). > > This is the actual implementation from DateTime.pm > > sub day_of_week { $_[0]->{local_c}{day_of_week} } > > -J > I compute the number of days in the current year I figure out the day of week for january the first and if this is (365 days in the year and "Sunday" or 7 in datetime) or ("Saturday" 6 in datetime or "Sun and a leap year) then I return 53 sundays as the number of sundays else I return 52 as the number of sundays. I checked the docs for datetime and used them F:\scripts>perldoc DateTime|grep day_of_week File STDIN: $dow= $dt->day_of_week; # 1-7 (Monday is 1) - also dow, wday "_0". So for example, this class provides both "day_of_week()" and "day_of_week_0()" methods. The "day_of_week_0()" method still treats Monday as the first day of the * day_of_week, wday, dow Am I missing something? Thanks Ron Hill
figuring out the number of sundays in a given year
Hi All, I have started a project in which I need to figure out the number of sundays in a given year. Here is what I have come up with. Seams to work!! any suggestions :) FAQ anyone:) Ron Hill script= use strict; use warnings; use DateTime; my $dt = DateTime->new( year => 2001 ); my $num = number_of_sundays($dt); print $num; sub number_of_sundays { my ($dt) = @_; my $dt2 = $dt->clone(); if ( $dt->is_leap_year ) { my $dow = $dt2->day_of_week( year => $dt->year, month => 1, day => 1, ); return 53 if ( $dow == 7 or $dow == 6 ); } else { my $dow = $dt2->day_of_week( year => $dt->year, month => 1, day => 1, ); return 53 if ( $dow == 7 ); } return 52; }
RE: [OT] Article idea for The Perl review 'Introduction to DateTi me'
Hi Iain, > > > * Hill, Ronald ([EMAIL PROTECTED]) [27 Aug 2003 03:04]: > > > I wanted to ask the group about an idea I have for an > > article for the perl review. > > The Perl Review is on hold until brian d foy comes back from > active duty. Perhaps try TPJ? > Hmn! That is what I thought until I received this. This was from Andy Turoff. Ron, This sounds like a very good idea for an article. We're looking to resurrect TPR for September publication. Any chance you could have a draft ready within a week or two? Thanks, Z.
[OT] Article idea for The Perl review 'Introduction to DateTime'
Hi All, I wanted to ask the group about an idea I have for an article for the perl review. This would be a beginner/newbie article on basic usage of DateTime. I have put together some ideas starting with getting things into/out of DateTime and comparing dates. Any other ideas for the article? I want to keep is simple as possible. Thanks Ron Hill datetime.pod Description: Binary data
Problems generating a set using the DataTime::Easter module
Hi All, I am having problems generating a set using the DateTime:;Easter module. Here is the code. #!/usr/bin/perl use strict; use warnings; use DateTime; use DateTime::Set; use DateTime::Event::Easter; my $easter_sunday = DateTime::Event::Easter->new(); my $dt1 = DateTime->new( year => 2000, month => 1, day=> 1, ); my $dt2 = DateTime->new( year => 2050, month => 12, day=> 1, ); my $set1 = $easter_sunday->as_set(from=>$dt1, to=>$dt2); error is: Can't locate object method "new" via package "DateTime::Set" (perhaps you forgot to load "DateTime::Set"?) at F:/perl/site/lib/DateTime/Event/Easter.pm line 184. It seems that there is no new method in the DateTime::Set module. Please advise. Thanks Ron Hill
RE: Get the right C compiler?
Hi Iain. > > > > * Dave Rolsky ([EMAIL PROTECTED]) [10 Aug 2003 00:38]: > > On Sat, 9 Aug 2003, Iain Truskett wrote: > > > > This make sense? make's default $(CC) may have no relation to > > > the one Perl was compiled with, so shouldn't we use what > > > knowledge we can get? > > > [snipped] > Good question. Not sure. At the very least it means it gets it correct > for one Solaris box I have access to. > [snipped] How about something like this: use strict; use warnings; use Config; print $Config{make}; on my system this prints: F:\scripts>x.pl nmake maybe something like this may be helpful. > cheers, > -- > Iain. Ron Hill
[Test Report] RE: ANNOUNCE: DateTime 0.1601
Hi Dave, > 0.1601 2003-08-07 > > [ BUG FIXES ] > F:\perl_modules\DateTime-0.1601>nmake test [snipped] All tests successful, 4 subtests skipped. Files=26, Tests=1455, 12 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) Looks good :) Ron Hill
[FYI] FW: Computing moonrise with perl
Hi All, I need to bring everyone up to date on the status of the Astro stuff. I have been in contact with Tim Jenness on moonrise issues and here is what has transpired: On Tue, 22 Jul 2003, Hill, Ronald wrote: > > Hi Tim, > > > > > > Sure - I can't guarantee to be able to find the time since > > > I'm busy at the moment but I'll try. > > > Thanks Tim :) > > I have chosen the below date/location as the test date. When > > I run the script as is I receive this. > > > F:\scripts>moonrise.pl > > Rise Time:15:30 > > Set time:21:59 > > F:\scripts> > > > As you can see I am way off :( > > I'll see what I get with slalib. > > > Actually, FYI, an update to my Astro::Coords module > > > on CPAN (which I will release next week) includes moon and > > > sunrise time [it's not the main focus of the module but since it > > > implemented rise & set time for arbitrary objects, > > > sun/moon rise falls out of it because the > > > SLALIB library has sun and moon positions built in.] > > > > > I checked the readme for the Astro-SLA module. > > > Please contact Pat Wallace ([EMAIL PROTECTED]) for details of how > > to obtain the (proprietary) C SLALIB library. > > > A C compiler is required - this is an XS module. A Fortran compiler (such > > as g77) is required if you are building against the Fortran library [or > > at least the Fortran runtime libraries]. > The fortran library has just been LGPLed. At some point soon (not > immediately) I will try to run it through f2c. The C version is defintely > not LGPL'ed (it's free to astronomers but Pat actually sells it to > companies like Meade for their telescope tracking). > > > Outch!! Not many people have a Fortran compiler on windows :( > > It sure would be nice to use this. The problem is that > > I am writing this for the DateTime project and I don't > > think this would fit with that project.(opensource) > It was LGPL'ed because of the DateTime project. Josh was wondering whether > we could get slalib opened up, and it turns out that we could. kudos to Josh :) I think this is great news! Now all we have to do is somehow integrate this into DateTime. > > > Any way, i would like to thank you for taking a look at this. > > No problem
RE: Re perl SQL daylight saving problem
Hi Arno, [snipped] > Dear Sirs > Please help. > > My problem is that when reading data from the Data Base via > Perl script all extracted dates remain unchanged by > Perl except dates within Daylight Savings periods. How are you extracting the dates? Are you using DBI? Are you using the sql utility from Ingres? You have not provided enought information for us to help you. > > There is no Data Manipulation or binding in the Perl script. We don't know that because you have not provided us with sample code. I use the DBI/DBD Ingres to access our Ingress datebase without any problems. How are you getting the data into your perl script? How are you getting it out? We need to see some code. Ron Hill
RE: Problems installing on Win32.
Hi Nick, > > I really want to play with this module but I just can't get > the thing to make. I'm no guru or coder I just muck about with perl so > working out how to install DateTime-0.13 into > ActivePerl using CPAN was an effort in itself. [snipped] What version of activestate perl are you running? If it is perl 5.8.0 then you are in luck because I have just completed the generation of ppm's for that release. (tested by Cameron). Let me know. Ron Hill
RE: nmake test failure on perl 5.8.0 CVS version of datetime.pm
Hi Dave, [snipped] > > > The test was wrong, I believe. Either that or the locale had > a bug that is now fixed. yes, It now passes on 5.8.0 [more snippage] > I can't stress this enough. When tests fail, please rerun > the tests with 'make test TEST_VERBOSE=1 TEST_FILES=t/...' > This gives me extra info that makes it easier to track down > the failures. OK, I'm sorry about that. I will include this in the future G:\modules\DateTime.pm>nmake test TEST_VERBOSE=1 TEST_FILES=t/20infinite.t Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(1, 'blib\lib', 'blib\arch )" t/20infinite.t t/20infinite1..37 ok 1 - positive infinity should be infinite ok 2 - negative infinity should be infinite ok 3 - positive infinity should not be finite ok 4 - negative infinity should not be finite ok 5 - negative infinity is really negative ok 6 - positive infinity is really positive ok 7 - positive infinity is bigger than negative infinity ok 8 - infinity - normal = infinity ok 9 - normal + infinite duration = infinity ok 10 - normal - infinity = neg infinity not ok 11 - normal + neg infinite duration = neg infinity # Failed test (t/20infinite.t at line 53) # got: 'DateTime::Infinite::Future=HASH(0x1e2f4a0)' # expected: 'DateTime::Infinite::Past=HASH(0x1dfee58)' not ok 12 - infinity - infinity = nan (days) # Failed test (t/20infinite.t at line 61) # got: '-2147483648' # expected: '2147483648' not ok 13 - infinity - infinity = nan (seconds) # Failed test (t/20infinite.t at line 61) # got: '-2147483646' # expected: '2147483648' ok 14 - infinity + normal duration = infinity ok 15 - infinity - normal duration = infinity ok 16 - infinity (datetime) == infinity (number) ok 17 - neg infinity (datetime) == neg infinity (number) ok 18 - pos year is 1.\#INF ok 19 - neg year is 1.\#INF ok 20 - pos month is 1.\#INF ok 21 - neg month is 1.\#INF ok 22 - pos day is 1.\#INF ok 23 - neg day is 1.\#INF ok 24 - pos hour is 1.\#INF ok 25 - neg hour is 1.\#INF ok 26 - pos minute is 1.\#INF ok 27 - neg minute is 1.\#INF ok 28 - pos second is 1.\#INF ok 29 - neg second is 1.\#INF ok 30 - pos microsecond is 1.\#INF ok 31 - neg microsecond is 1.\#INF ok 32 - pos millisecond is 1.\#INF ok 33 - neg millisecond is 1.\#INF ok 34 - pos nanosecond is 1.\#INF ok 35 - neg nanosecond is 1.\#INF ok 36 - positive infinite is greater than now ok 37 - negative infinite is less than now # Looks like you failed 3 tests of 37. dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 11-13 Failed 3/37 tests, 91.89% okay Failed TestStat Wstat Total Fail Failed List of Failed --- t/20infinite.t3 768373 8.11% 11-13 Failed 1/1 test scripts, 0.00% okay. 3/37 subtests failed, 91.89% okay. NMAKE : fatal error U1077: 'F:\perl\bin\perl.exe' : return code '0x2' Stop. G:\modules\DateTime.pm> > > I have no idea why this would suddenly start failing when it > seemed to be fine last go-round. yes, I checked this test using 5.6.1 and these tests pass on W2K > I hate infinite numbers. I hate Windows. > Whoever suggested DT::Infinite, damn you! > [more snippage] > > Just 5.8.0? Oh, goody. nope :( I tried this with perl 5.8.1 RC2 and receive the same types of errors. > > Absent someone with understanding IEEE math and how it works > on Win32, I consider this unlikely to get fixed. > I sure as heck don't know what's going on. neither do I. Hopefully, someone on the DateTime list can step up and take a look at it. > I may simply add something to the DT::Infinite > docs saying that it's known to be broken on Win32. > I hope this helps. Ron Hill
nmake test failure on perl 5.8.0 CVS version of datetime.pm
Hi All, Test report for the CVS version of datetime. Is there a better place to post test results other than on the newsgroup? Hope this helps. Ron Hill [snipped] t\13strftime..NOK 41# Failed test (t\13strftime.t at line 44) # got: 'Sep 7, 1999 1:02:42 PM' # expected: '1:02:42 PM Sep 7, 1999' # New locale: de t\13strftime..ok 75/126# New locale: it t\13strftime..ok 126/126# Looks like you failed 1 tests of 126. t\13strftime..dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 41 Failed 1/126 tests, 99.21% okay These tests failed for both 5.6.1 and 5.8.0 [more snippage] t\20infinite..NOK 11# Failed test (t\20infinite.t at line 53) t\20infinite..NOK 12# Failed test (t\20infinite.t at line 61) # got: '-2147483648' # expected: '2147483648' t\20infinite..NOK 13# Failed test (t\20infinite.t at line 61) # got: '-2147483646' # expected: '2147483648' t\20infinite..ok 37/37# Looks like you failed 3 tests of 37. t\20infinite..dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 11-13 Failed 3/37 tests, 91.89% okay This is odd the infinite tests did not fail for perl version 5.6.1
Datetime 0.13 and DateTime-timezone0.23 ppm's for perl 5.8.0 [alp ha]
Hi Cameron, I have created some test ppm's for perl 5.8.0 (DateTime & DateTime-Timezone) and I need someone to test them for me. Can you help? Please advise :) Thanks Ron Hill
RE: ANNOUNCE: Time::Local 1.07_90
Hi Dave, > If people on non-Unix platforms could try this out I'd be > quite grateful. > I'm especially interested in hearing from Win32 and Mac > users. [snipped] F:\perl_modules\Time-Local-1.07_90>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch' )" t\Local.t t\Localok All tests successful. Files=1, Tests=102, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) F:\perl_modules\Time-Local-1.07_90> I have tested this for perl 5.6.1 / 5.8.0 and perl 5.8.1 RC2 All tests pass :) Ron Hill
RE: DateTime parse(), parser()
Hi John & Iain > On Sunday, July 13, 2003, at 08:11 PM, Iain Truskett wrote: > > Remember: part of the point of having the various format > > modules is that you can pick'n'mix. You could conceivably > > wrap a number of them in Builder to make your own parser > > that recognizes the sorts of dates you come across. I mostly I think an example of this type of thing needs to go into the FAQ. Do you have an example of doing this? > > come across HTTP, W3CDTF and RFC2822 dates so I'm all set =) > > Sure, but my main point is that I don't want to have to > manually load and use parsers. I want DateTime (the class and/or > individual objects) I agree with you on this. I feel that there should be a default simple parser within datetime. > have a catch-all parse() method that uses the parser class of my > choosing. And I want the default to be something than can > handle most "normal" date formats, ignoring as much complexity as it > takes to get into the "core" (even though DateTime::Format::Simple > would still be its own module, and might not even be loaded > until the first call to parse()) > > > However, I'm interested in seeing your regex to see if you > > parse anything that might be of use to me. Would you like to > > share? > > They're super boring. Heck, these two cover almost everything I'm > interested in: > [snipped] > > Really, I'm not asking for the moon. The key features are the > "built-in/used by default" nature and the "I can handle whatever" > parse() method (instead of parse_date(), parse_datetime(), > parse_year_and_day_but_not_month(), etc.) Since this is all > so simple, I think it should be "built in" via the creation > and default use of a DateTime::Format::Simple module and > a generalized parse() class/object method for DateTime. [much snippage] John, Can I encourage you to put together a Format::Simple module and release it? I think we need something out there for very basic date parsing. There is the DateTime::Format::HTTP that comes very close ( It works great on Ingres dates/times). Or maybe the regrex that you provided can be incorporated into HTTP? What do you think? Ron Hill
RE: Announce: DateTime-Format-HTTP-0.33
Hi Iain, > I went on to say in the email to which you replied: > > : Note: you'll need the CVS version of DateTime::TimeZone > : because I fixed a bug in that rather than modify my own > : tests. The daily CVS snapshot archive will have appropriate > : snapshots in about 19 hours. > > This is now the released 0.23 version of DateTime::TimeZone, > on CPAN now. I've just released 0.34 of HTTP to CPAN which > has the DT::TZ requirement bumped up a bit. I thought I did update from CVS but apparently it did not take. I had to downlaod/install DateTime-TimeZone from CPAN in order to get it to work correctly. All tests successful (1 subtest UNEXPECTEDLY SUCCEEDED), 1 subtest skipped. Files=4, Tests=61, 1 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) G:\modules\DateTime-Format-HTTP>nmake install Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Installing F:\Perl\site\lib\DateTime\Format\HTTP.pm Writing F:\Perl\site\lib\auto\DateTime\Format\HTTP\.packlist Appending installation info to F:\Perl\lib/perllocal.pod Sorry, Ron Hill
RE: Announce: DateTime-Format-HTTP-0.33
Hi Iain, > > The uploaded file > > DateTime-Format-HTTP-0.33.tar.gz > > has entered CPAN as > > file: $CPAN/authors/id/S/SP/SPOON/DateTime-Format-HTTP-0.33.tar.gz > size: 17937 bytes >md5: 9f42cd9cd33c217d099337dc18f57758 > > > This module provides an interface between DateTime and > HTTP::Date. Anything that HTTP::Date can understand > can now be easily transformed into a DateTime object. > > It also has some formatting routines, just like HTTP::Date's. This is great!! Now if I just get the tests to pass ;) F:\perl_modules\DateTime-Format-HTTP-0.33>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\bin\Perl.exe -Mblib -IF:\Perl\lib -IF:\Perl\lib -e "use Test::Harness qw(&runtests $ verbose); $verbose=0; runtests @ARGV;" t\99pod.t t\basic.t t\date.t t\time2str.t Using F:/perl_modules/DateTime-Format-HTTP-0.33/blib t\99pod...ok 1/1 skipped: File::Find::Rule not installed t\basic...ok t\dateok 1/55# #Don't worry about the large number of error messages. #That's the module doing its job. # #Worry about actual test failures. # Invalid offset: GMT # Looks like you planned 55 tests but only ran 1. # Looks like your test died just after 1. t\datedubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-55 Failed 54/55 tests, 1.82% okay t\time2strok 1/3Invalid offset: GMT # Looks like you planned 3 tests but only ran 1. # Looks like your test died just after 1. t\time2strdubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-3 Failed 2/3 tests, 33.33% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t\date.t 255 6528055 54 98.18% 2-55 t\time2str.t 255 65280 32 66.67% 2-3 1 subtest skipped. Failed 2/4 test scripts, 50.00% okay. 56/61 subtests failed, 8.20% okay. NMAKE : fatal error U1077: 'F:\perl\bin\Perl.exe' : return code '0x2' Stop. F:\perl_modules\DateTime-Format-HTTP-0.33> Hope this helps! Ron Hill
RE: ppm builds for Win32?
Hi Dave, > > > On Tue, 1 Jul 2003, Hill, Ronald wrote: > [snipped] > Hmm, the recent releases of Archive::Tar are totally > rewritten in Perl, primarily in order to work > consistently across all platforms. What > version do you have? I curently have version 0.23 I checked th eBuild.pl file and followed the recommendations 'Archive::Tar' => 0.23, I will install the 1.03 version that I found on cpan [more snippage] > > > > includes a "./Build ppd" action to auto-generate a ppd file, > > > which may be useful. > > > > F:\perl_modules\DateTime-TimeZone-0.21>perl build ppd > > Cannot create a PPD file unless codebase argument is given > > I checked the docs for Module-Build and found no reference > > to the ppd function. So I have no idea what it wants. > > This would be in the Build.PL file in the call to Module::Build->new() > > I'm the one who wrote most of the code in Module::Build::PPMMaker, and > honestly I have no idea how correct it is. I couldn't find much good > documentation of PPM/PPD stuff. You might want to talk to Randy Kobes on this. He is the one that knows ppm the most. [more snippage] > > I didn't say that would work ;) I just said it should install without > needing a compiler or nmake, via the CPAN shell or from the > command line. > > Don't mind me, I'm just having a bad day with perl ;) Ron Hill
RE: ppm builds for Win32?
Hi Dave, [snipped] > > You can do "./Build dist". The latest Module::Build beta > (0.18_02) also I tried this. Here is the result. Creating DateTime-TimeZone-0.21.tar.gz Can't locate object method "create_archive" via package "Archive::Tar" at F:\pe ild/Base.pm line 1323. I then checked the Docs for Archive-Tar and found this: Although rich in features, it is known to not work on Win32 platforms. On those platforms, Archive::Tar will silently and transparently fall back to Archive::Tar::Win32. Please refer to that manpage if you are on a Win32 platform. OK, great, I guess I need to fill out another bug report? > includes a "./Build ppd" action to auto-generate a ppd file, > which may be useful. F:\perl_modules\DateTime-TimeZone-0.21>perl build ppd Cannot create a PPD file unless codebase argument is given I checked the docs for Module-Build and found no reference to the ppd function. So I have no idea what it wants. > > However, in theory, a non-XS module that uses Module::Build > should install on Windows just fine, without any need for > external tools, no compiler, no nmake. As of now I am unable to generate a ppm file for DateTime-TimeZone for perl version 5.8.0 Ron Hill
RE: ANNOUNCE: DateTime::Format::Strptime 1.0301
Hi Rick > t\004_croakNOK 4# Failed test (t\004_croak.t at line 15) > # got: 'Unidentified token in pattern: %X in %Y %X > at t\004_croak.t > [snippage] I have looked at this some more and found out that the message for the croak tests needs to be changed. At the top of croak.t I added this if ($^O =~ /MSWin32/ ) { $croak ='t\\004_croak.t'; }else{ $croak ='t/004_croak.t'; } Then I went through and changed all occurences of 't/004_croak.t' to use $croak. I reran the tests and they all pass. I have not tested this on any unix systems. I have updated rt.cpan.org to reflect this. Hope this helps. Ron Hill
RE: ANNOUNCE: DateTime::TimeZone 0.21
Hi Dave, [snipped] > > 0.21 2003-06-25 > > - Switched to Module::Build, which should fix the installation > problems caused by very long Makefile lines on some platforms. I just tried on HPUX 10.20 HP's ANSI c compiler and was unable to install the module :( This was due to a dependency problem not datetime. I am unable to compile/install ExtUtil-ParseXS on HP platform. I submitted a bug report on rt.cpan.org for this.
RE: ANNOUNCE: DateTime 0.13
Hi Cameron, > > I still can't get the ppm to work in Windows: > We have not yet build the ppm file as of yet (the new one) I just installed it myself and I need to build it. Ron Hill
RE: ANNOUNCE: DateTime::Format::Strptime 1.0301
Hi Rick, [snipped] F:\perl_modules\DateTime-Format-Strptime-1.03>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\bin\Perl.exe -Mblib -IF:\Perl\lib -IF:\Perl\lib -e "use Test::H verbose); $verbose=0; runtests @ARGV;" t\001_load.t t\002_dates.t t\003_every.t Using F:/perl_modules/DateTime-Format-Strptime-1.03/blib t\001_load.ok t\002_datesok t\003_everyok t\004_croakNOK 4# Failed test (t\004_croak.t at line 15) # got: 'Unidentified token in pattern: %X in %Y %X at t\004_croak.t li # expected: 'Unidentified token in pattern: %X in %Y %X at t/004_croak.t li # Turned Croak Off t\004_croakok 14/30# Turned Croak On t\004_croakNOK 16# Failed test (t\004_croak.t at line 75) # got: 'WARN: Unidentified token in pattern: %X in %X. Leaving old pat _croak.t line' # expected: 'WARN: Unidentified token in pattern: %X in %X. Leaving old pat _croak.t line' t\004_croakNOK 18# Failed test (t\004_croak.t at line 80) # got: 'Your datetime does not match your pattern. at t\004_croak.t li # expected: 'Your datetime does not match your pattern. at t/004_croak.t li t\004_croakNOK 20# Failed test (t\004_croak.t at line 85) # got: 'Your two year values (03 and 2002) do not match. at t\004_croa # expected: 'Your two year values (03 and 2002) do not match. at t/004_croa # Turned Croak to Sub t\004_croakok 30/30# Looks like you failed 4 tests of 30. t\004_croakdubious Test returned status 4 (wstat 1024, 0x400) DIED. FAILED tests 4, 16, 18, 20 Failed 4/30 tests, 86.67% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t\004_croak.t4 1024304 13.33% 4 16 18 20 Failed 1/4 test scripts, 75.00% okay. 4/56 subtests failed, 92.86% okay. NMAKE : fatal error U1077: 'F:\perl\bin\Perl.exe' : return code '0x2' Stop. F:\perl_modules\DateTime-Format-Strptime-1.03> I hope this helps Ron Hill
RE: Having problems with Datetime-format-Strptime-1.02 install o n Win32
Hi Rick, [snipped] > > Yup, DateTime on CVS won't work. Which reminds me that I need to > supply Dave with another patch before he releases the new DateTime. > > [Explaination: DateTime now requires a valid date. Strptime for > day-of-year initiates DateTime with a year=>$year month=>1 and > day=>$day-of-year] > Well, at least you know about the problem. I am now in the process of rewritting some perl CGI scripts and was hoping I could use DateTime instead of the Date-Manip/Calc modules and right now I need to parse a date!! What I was going to do was something like this: my $Strp = new DateTime::Format::Strptime( pattern => '%e-%B-%Y %T', language=> 'English', time_zone => 'America/Los_Angeles', ); my $dt = $Strp->parse_datetime('18-jun-2003 10:07:38'); I really need to get a feel for all of the modules out there!! Thanks Rick!! Ron Hill
Having problems with Datetime-format-Strptime-1.02 install on Wi n32
F:\perl_modules\DateTime-Format-Strptime-1.02>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\bin\Perl.exe -Mblib -IF:\Perl\lib -IF:\Perl\lib -e "use Test::Harness qw(&runtests verbose); $verbose=0; runtests @ARGV;" t\001_load.t t\002_dates.t t\003_every.t t\004_croak.t Using F:/perl_modules/DateTime-Format-Strptime-1.02/blib t\001_load.ok t\002_datesok 2/17The 'day' parameter to DateTime::new did not pass the 'is between 1 and 31' c llback at F:/perl_modules/DateTime-Format-Strptime-1.02/blib/lib/DateTime/Format/Strpt ime.pm line 478 # Looks like you planned 17 tests but only ran 2. # Looks like your test died just after 2. t\002_datesdubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 3-17 Failed 15/17 tests, 11.76% okay t\003_everyok 5/6The 'day' parameter to DateTime::new did not pass the 'is between 1 and 31' ca lback at F:/perl_modules/DateTime-Format-Strptime-1.02/blib/lib/DateTime/Format/Strpt ime.pm line 478 # Looks like you planned 6 tests but only ran 5. # Looks like your test died just after 5. t\003_everydubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 6 Failed 1/6 tests, 83.33% okay t\004_croak# Turned Croak Off t\004_croakok 10/20# Turned Croak On t\004_croakNOK 14# Failed test (t\004_croak.t at line 42) # got: 'Unidentified token in pattern: %X in %Y %X at t\004_croak.t line' # expected: 'Unidentified token in pattern: %X in %Y %X at t/004_croak.t line' t\004_croakNOK 16# Failed test (t\004_croak.t at line 49) # got: 'WARN: Unidentified token in pattern: %X in %X. Leaving old pattern intact. at t\00 _croak.t line' # expected: 'WARN: Unidentified token in pattern: %X in %X. Leaving old pattern intact. at t/00 _croak.t line' t\004_croakNOK 18# Failed test (t\004_croak.t at line 53) # got: 'Your datetime does not match your pattern. at t\004_croak.t line' # expected: 'Your datetime does not match your pattern. at t/004_croak.t line' t\004_croakNOK 20# Failed test (t\004_croak.t at line 57) # got: 'Your two year values (03 and 2002) do not match. at t\004_croak.t line' # expected: 'Your two year values (03 and 2002) do not match. at t/004_croak.t line' # Looks like you failed 4 tests of 20. t\004_croakdubious Test returned status 4 (wstat 1024, 0x400) DIED. FAILED tests 14, 16, 18, 20 Failed 4/20 tests, 80.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed --- t\002_dates.t 255 6528017 15 88.24% 3-17 t\003_every.t 255 65280 61 16.67% 6 t\004_croak.t4 1024204 20.00% 14 16 18 20 Failed 3/4 test scripts, 25.00% okay. 20/45 subtests failed, 55.56% okay. NMAKE : fatal error U1077: 'F:\perl\bin\Perl.exe' : return code '0x2' Stop. F:\perl_modules\DateTime-Format-Strptime-1.02> I am running the CVS versions of DateTime/DateTime-TimeZone for perl 5.6.1 Any thoughts? Thanks Ron Hill
RE: Win32 failures in t/20infinite.t
Hi John, Dave > > Dave Rolsky wrote: > > Ok, I applied this. Does this mean all tests pass on Win32 now? > > > > I don't know; I'm at home (Linux only, thanks) and not at > work. I'll get the > latest CVS and double check on Monday. Is that soon enough? > > John > G:\modules\DateTime.pm>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\bin\Perl.exe -Mblib -IF:\Perl\lib -IF:\Perl\lib -e "use Test::Harness qw(&runtests $ verbose); $verbose=0; runtests @ARGV;" t\00load.t t\01sanity.t t\02last_day.t t\03components.t t\04e poch.t t\05set.t t\05tz.t t\06add.t t\07compare.t t\09greg.t t\10subtract.t t\11duration.t t\12week. t t\13strftime.t t\14language.t t\15jd.t t\16truncate.t t\17set_return.t t\18today.t t\19leap_second .t t\20infinite.t t\21bad_params.t t\22from_doy.t t\23storable.t t\zz_00load.t t\zz_01sanity.t t\zz_ 02last_day.t t\zz_03components.t t\zz_04epoch.t t\zz_05set.t t\zz_05tz.t t\zz_06add.t t\zz_07compare .t t\zz_09greg.t t\zz_10subtract.t t\zz_11duration.t t\zz_12week.t t\zz_13strftime.t t\zz_14language .t t\zz_15jd.t t\zz_16truncate.t t\zz_17set_return.t t\zz_18today.t t\zz_19leap_second.t t\zz_20infi nite.t t\zz_21bad_params.t t\zz_22from_doy.t t\zz_23storable.t Using G:/modules/DateTime.pm/blib t\00load..ok t\01sanityok t\02last_day..ok t\03componentsok t\04epoch.ok 4/31 skipped: Negative epoch times do not work on some operating systems, including Win32 t\05set...ok t\05tzNot an ARRAY reference at F:/perl/site/lib/DateTime/TimeZone.pm line 146. # Looks like your test died before it could output anything. t\05tzdubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-71 Failed 71/71 tests, 0.00% okay t\06add...ok t\07compare...ok 17/24Not an ARRAY reference at F:/perl/site/lib/DateTime/TimeZone.pm line 1 46. # Looks like you planned 24 tests but only ran 17. # Looks like your test died just after 17. t\07compare...dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 18-24 Failed 7/24 tests, 70.83% okay t\09greg..ok 34/35# this may take a minute... t\09greg..ok t\10subtract..ok t\11duration..ok t\12week..ok t\13strftime..ok t\14language..ok t\15jdok t\16truncate..ok t\17set_returnok 1/7Not an ARRAY reference at F:/perl/site/lib/DateTime/TimeZone.pm line 146 . # Looks like you planned 7 tests but only ran 1. # Looks like your test died just after 1. t\17set_returndubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-7 Failed 6/7 tests, 14.29% okay t\18today.ok t\19leap_second...ok 15/50Not an ARRAY reference at F:/perl/site/lib/DateTime/TimeZone.pm line 1 46. # Looks like you planned 50 tests but only ran 15. # Looks like your test died just after 15. t\19leap_second...dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 16-50 Failed 35/50 tests, 30.00% okay t\20infinite..NOK 14# Failed test (t\20infinite.t at line 56) # got: '0' # expected: '1.#QNAN' t\20infinite..ok 38/38# Looks like you failed 1 tests of 38. t\20infinite..dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 14 Failed 1/38 tests, 97.37% okay t\21bad_paramsok t\22from_doy..ok t\23storable..Not an ARRAY reference at F:/perl/site/lib/DateTime/TimeZone.pm line 146. # Looks like your test died before it could output anything. t\23storable..dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-5 Failed 5/5 tests, 0.00% okay t\zz_00load...ok t\zz_01sanity.ok t\zz_02last_day...ok t\zz_03components.ok t\zz_04epoch..ok 4/31 skipped: Negative epoch times do not work on some operating systems, including Win32 t\zz_05setok t\zz_05tz.Not an ARRAY reference at F:/perl/site/lib/DateTime/TimeZone.pm line 146. # Looks like your test died before it could output anything. t\zz_05tz.dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-71 Failed 71/71 tests, 0.00% okay t\zz_06addok t\zz_07compareok 17/24Not an ARRAY reference at F:/perl/site/lib/DateTime/TimeZone.pm line 1 46. # Looks like you planned 24 tests but only ran 17. # Looks like your test died just after 17. t\zz_07comparedubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 18-24 Failed 7/24 tests, 70.83% okay t\zz_09greg...ok 34/35# this may take a minute... t\zz_09greg...ok t\zz_10subtract...ok t\zz_11duration...ok t\zz_12week
RE: Compilation on HPUX, AIX, VMS, etc
Hi Dave, > > Can people try to compile DateTime.pm on various platforms that aren't > Linux, BSD, or Win32, and let the list know if it works. I > will be trying > Mac OSX and Solaris via the SF compile farm, but I don't have > access to > other propietary Unix variants, or VMS, QNX, or other weird > things like > that. using perl5.8.0 for HPUX 10.20 t/13strftime...ok 123/123# Looks like you failed 106 tests of 123. t/13strftime...dubious Test returned status 106 (wstat 27136, 0x6a00) DIED. FAILED tests 1-106 Failed 106/123 tests, 13.82% okay t/14language...ok t/15jd.ok t/16truncate...ok t/17set_return.ok t/18today..ok t/19leap_secondok t/20infinite...NOK 31# Failed test (t/20infinite.t at line 82) # got: '1.79769313486232e+305' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) # got: '-1.79769313486232e+305' # expected: '-1.79769313486232e+308' # Failed test (t/20infinite.t at line 82) # got: '1.79769313486232e+302' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) # got: '-1.79769313486232e+302' # expected: '-1.79769313486232e+308' t/20infinite...ok 38/38# Looks like you failed 4 tests of 38. t/20infinite...dubious Test returned status 4 (wstat 1024, 0x400) DIED. FAILED tests 31-34 Failed 4/38 tests, 89.47% okay Failed TestStat Wstat Total Fail Failed List of Failed - t/13strftime.t 106 27136 123 106 86.18% 1-106 t/20infinite.t4 1024384 10.53% 31-34 Failed 2/21 test scripts, 90.48% okay. 110/1442 subtests failed, 92.37% okay. *** Error exit code 2 Stop. $ :( Ron
RE: Getting DateTime with ActiveState ppm
Hi Cameron, > > Hi everyone. > > I just tried to install DateTime in Windows with ppm but it > crashed ppm. > This is what I did: > >ppm> repository add 'DateTime Repository' \ > http://datetime.perl.org/download/5.8.0 >ppm> install DateTime > > and then ppm crashes with some perl error (I can't remember the error > right now; when I boot Windows again I'll copy it if needed). Can you provide us with the error? Are you sure you are using perl 5.8.0 (output from perl -v?) > > Is there something I'm doing wrong? Is this a known problem? > Can I get > around it? Do you have all of the dependencies installed? Was the error depencencies failed? here is a list of what is required. Class-Factory-Util DateTime-TimeZone Params-Validate Test-More Time-Local > > Thanks, > > Cameron I hope this helps. Ron Hill
Re: [perl #22568] error running make against makefile for DateTim e-TimeZone-0.16
Hi Dan, > I am the sysadmin, and we do have a /bin/sh. [snipped] > I wish that it were that simple. Basically, I have some developers that > need this module so that they can use another module, but this is the only > one that I have had any problems with. Would you like a copy of the > Makefile? I see you are running AIX 5.0 and version 5.6.0 of perl. (not the best version of perl you might wast to goto at least 5.6.1 or 5.8.0) The latest version of that module is 0.17 please try and install that one. If you have further issues with this. Please report the problem on the DateTime list: http://datetime.perl.org or e-mail the list [EMAIL PROTECTED] > Thanks for your time and effort. Thank you for using the datetime modules Ron Hill On Wed, Jun 04, 2003 at 06:40:56PM -, [EMAIL PROTECTED] (via RT) wrote: > Whenever I try to run the make command against this module, I get the > following error: [EMAIL PROTECTED]/home/user/is74601/perl/modules/time-date/DateTime-TimeZone-0 .16 > # make > /bin/sh: not found
RE: DateTime 0.12CVS - Success from Cygwin, still failing under V C++
> > > On Wed, 4 Jun 2003, John Peacock wrote: > > > The t/13strftime.t file has DOS line endings, which causes > all tests to fail > > under Cygwin. If that is corrected, then Cygwin tests > completely clean. > > Really? I can't see them. I think I know what went wrong. I updated my modules from CVS (remember I am one of the poor souls on windows) and did a nmake dist to generate the tar file. Then I sent it to John (He was having problems with CVS) This is where the DOS line endings came into play. I guess I may want to setup CVS on unix :) Ron
RE: DateTime 0.12CVS - Success from Cygwin, still failing under V C++
Hi John, > > > And to follow up on that, it appears that POSIX used the C > definition for > gmtime() and it does not *explicitely* require support for > negative time_t > values. It appears that DEC implementated negative time_t > support and other > vendors added it as well (AIX 3.2.5 has it for example). > > Dopes! If you aren't going to support negative numbers, why > use long integer > (and give rise to the Y2038 issue)? > > John What I find strange is that timegm work correctly!! And in the documentation for timegm it states: These routines are the inverse of built-in perl functions localtime() and gmtime. >From that statement one would think it would work both ways! Just my 2 cents. Ron
RE: DateTime 0.12CVS - Success from Cygwin, still failing under V C++
Hi John, [snipped] > Specifically, the first failure is this block: > > > { > > my $dt = DateTime->from_epoch( epoch => -2082844800 ); > #fails here > > is( $dt->year, 1904, 'year should be 1904' ); > > is( $dt->month, 1, 'month should be 1904' ); > > is( $dt->day, 1, 'day should be 1904' ); > > } > > which fails because this code in from_epoch(): > > > @args{ qw( second minute hour day month year ) } = > > ( gmtime( delete $p{epoch} ) )[ 0..5 ]; > > does not, in fact initialize anything in the %args hash: > > > %args = ( > > "month" => undef, > > "day" => undef, > > "minute" => undef, > > "year" => undef, > > "hour" => undef, > > "second" => undef > > ); > > Apparently M$loth's implementation of gmtime() doesn't > support negative numbers > _at all_: > yep!! I just figured that out myself with this: use warnings; use strict; use diagnostics; use Time::Local; my $time = timegm(1,1,1,1,1,1969); print $time ."\n"; my $now = gmtime($time) or die"$?"; #my $now = gmtime(-2082844800) or die"$@"; print $now; fails horrably on windows :( I posted this on CLPM maybe someone has something on this. > D:\working\DateTime-0.12>perl -e "print '<'.scalar gmtime(1).'>'" > > D:\working\DateTime-0.12>perl -e "print '<'.scalar gmtime(-1).'>'" > <> > > even though time_t is defined as a long integer (not unsigned long): > > http://msdn.microsoft.com/library/default.asp?url=/library/en- us/vccore98/HTML/_crt_mktime.asp MORONS! Anyone up to creating a POSIX compliant gmtime() out of whole cloth for the poor souls running Win32??? I guess that could be included in Time::Local... Outch !! Ron Hill
RE: Windows once more
> > But DT::TZ installs normally without DT.pm being installed, so I don't > know what the problem is. > > > -dave But you can't run the tests without DT.pm. I think that is what he is referring to. Ron
RE: Windows once more
Hi Dave, > > I'd have to write a script to automatically grab the CVS stuff, but I > suppose it's possible. If you do write a script, can you send me a copy? > > The links on datetime.perl.org are for PPDs, which are > rapidly aging. I'm > considering removing them since they're so out of date. I > think we need a > script to generate those as well. Yes I agree! I would be willing to write something just as soon as we can build DateTime.pm on Windows :) Ron Hill
RE: Windows once more
Hi Dave, > > On Mon, 2 Jun 2003, Hill, Ronald wrote: > > I can't even get it to work on HPUX :( > > Try removing the "ifdef _HPUX_SOURCE" part entirely. > > > -dave I removed the section you suggested Still no joy :( Ron Hill
RE: Patch DateTime-0.12 on HPUX Perl 5.8.0
Hi Dan, > > * Hill, Ronald <[EMAIL PROTECTED]> shaped the > electrons to say... > > > > On Fri, 30 May 2003, Dan Sully wrote: > > > > > > > HPUX doesn't have finite() - it has isfinite() instead. > > > > Not my HPUX box. I'm running 10.20 and the HP ANSI C compiler > > I tried the make test and here is a listing of the errors > > Of course they would have to change it between 10.20 and 11.00/11i > > I unfortunately don't have a 10.20 box to test on. > > What does a 'man finite' get you? > > -D I did a man on finite here are the results: DESCRIPTION The finite() function is recommended by the IEEE-754 standard for floating-point arithmetic. finite() returns 1 only when -INFINITY < x < +INFINITY. Otherwise, it returns 0 (that is, when x is +-INFINITY or x is NaN). finitef() is a float version of finite(); it takes a float argument. To use this function, compile either with the -Ae option or with the -Aa and -D_HPUX_SOURCE options. Otherwise, the compiler promotes the float argument to double, and the function returns incorrect results. finitef() is not specified by any standard, but it is named in accordance with the conventions specified in the "Future Library Directions" section of the ANSI C standard. I hope this helps Ron Hill
RE: Windows once more
Hi Dave, > > On Mon, 2 Jun 2003, Hill, Ronald wrote: > > > I was not able to find the Time::Local module on CPAN > > Yeah, it's not there yet. I guess I will wait for it. > ARGH! > > I give up. Someone else is going to have to fix this on > Windows at this > point, or maybe I'll just disable these tests on Win32. > > > -dave Oh, Dave please don't give up. We need this for all Platforms Otherwise, modules that use recurences will fail horribly! (like mine). This is the reason I need to install the latest DateTime.pm module, So I can test my module. I can't even get it to work on HPUX :( I guess I have to bite the bullet and try on AIX :( Ron Hill
RE: installing DateTime-TimeZone-0.17 on HPUX 10.20... or Cygwin
Hi Dave, > > On Mon, 2 Jun 2003, Ben Bennett wrote: > > > I still think it is a MakeMaker problem, has anyone reported it to > > them? > > And are you guys using the latest MakeMaker? I think this > might have been fixed in the new beta versions. > > > -dave I just installed ExtUtils-MakeMaker-6.10_04 from CPAN. Same results :( Ron Hill
RE: installing DateTime-TimeZone-0.17 on HPUX 10.20... or Cygwin
Hi John, > Rather than document it, is there any way to fix the Makefile > to have 32 1k lines instead of 1 32k line? I guess I was not clean as what I was refering to when I made the statement of "Document it". What I should have asked is "Is there a place to document the test results that I have" Sorry, I should have been more clear. However, I agree the this needs to be fixed in the makefile. > Having to require a specific make/gmake is really > not a good plan. It should be very unusual to require some > different helper utility like 'gmake' to build an > extension to Perl when that resident 'make' can > build Perl itself. > > John > You are absolutely correct!! Ron Hill
RE: Patch DateTime-0.12 on HPUX Perl 5.8.0
Hi Dan, > On Fri, 30 May 2003, Dan Sully wrote: > > > HPUX doesn't have finite() - it has isfinite() instead. Not my HPUX box. I'm running 10.20 and the HP ANSI C compiler I tried the make test and here is a listing of the errors $ make test PERL_DL_NONLAZY=1 /app/perl5.8.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00load.../usr/lib/dld.sl: Unresolved symbol: isfinite (code) from /home/hillr/DateTime-0.12/blib/arch/auto/DateTime/DateTime.sl # Failed test (t/00load.t at line 6) t/00load...NOK 1# Tried to use 'DateTime'. # Error: Can't load '/home/hillr/DateTime-0.12/blib/arch/auto/DateTime/DateTime.sl' for module DateTime: Unresolved external at /app/perl5.8.0/lib/5.8.0/PA-RISC2.0/DynaLoader.pm line 229. # at /app/perl5.8.0/lib/5.8.0/PA-RISC2.0/XSLoader.pm line 38 # BEGIN failed--compilation aborted at /home/hillr/DateTime-0.12/blib/lib/DateTime.pm line 38. # Compilation failed in require at (eval 1) line 2. # Looks like you failed 1 tests of 1. t/00load...dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay [snipped to keep short] So I then I changed the DateTime.xs to this #ifdef _HPUX_SOURCE #define finite finite #endif and reran the perl Makefile.PL, make and make test Results: $ make test PERL_DL_NONLAZY=1 /app/perl5.8.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00load...ok t/01sanity.ok t/02last_day...ok t/03components.ok t/04epoch..ok t/05setok t/05tz.ok t/06addok t/07compareok t/09greg...ok 29/35# this may take a minute... t/09greg...ok t/10subtract...ok t/11duration...ok t/12week...ok t/13strftime...ok t/14language...ok t/15jd.ok t/16truncate...ok t/17set_return.ok t/18today..ok t/19leap_secondok t/20infinite...ok 5/36# Failed test (t/20infinite.t at line 29) t/20infinite...NOK 6# Failed test (t/20infinite.t at line 36) # got: '0' # expected: '1' t/20infinite...NOK 9# Failed test (t/20infinite.t at line 40) # Failed test (t/20infinite.t at line 48) t/20infinite...NOK 11# Failed test (t/20infinite.t at line 59) t/20infinite...NOK 15# Failed test (t/20infinite.t at line 63) t/20infinite...NOK 16# Failed test (t/20infinite.t at line 66) t/20infinite...NOK 17# Failed test (t/20infinite.t at line 69) t/20infinite...NOK 18# Failed test (t/20infinite.t at line 82) t/20infinite...NOK 19# got: '-2' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) t/20infinite...NOK 20# got: '-2147458794' # expected: '-1.79769313486232e+308' # Failed test (t/20infinite.t at line 82) t/20infinite...NOK 21# got: '-2' # expected: '1.79769313486232e+308' t/20infinite...NOK 22# Failed test (t/20infinite.t at line 85) # got: '-2147458794' # expected: '-1.79769313486232e+308' # Failed test (t/20infinite.t at line 82) t/20infinite...NOK 23# got: '-2' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) t/20infinite...NOK 24# got: '-2147458794' # expected: '-1.79769313486232e+308' # Failed test (t/20infinite.t at line 82) t/20infinite...NOK 25# got: '86399' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) # got: '98048' # expected: '-1.79769313486232e+308' # Failed test (t/20infinite.t at line 82) # got: '86399' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) # got: '98048' # expected: '-1.79769313486232e+308' # Failed test (t/20infinite.t at line 82) t/20infinite...NOK 29# got: '86399' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) t/20infinite...NOK 30# got: '98048' # expected: '-1.79769313486232e+308' # Failed test (t/20infinite.t at line 82) t/20infinite...NOK 31# got: '1.79769313486232e+305' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) t/20infinite...NOK 32# got: '-1.79769313486232e+305' # expected: '-1.79769313486232e+308' # Failed test (t/20infinite.t at line 82) t/20infinite...NOK 33# got: '1.79769313486232e+302' # expected: '1.79769313486232e+308' # Failed test (t/20infinite.t at line 85) # got: '-1.79769313486232e+302' # expected: '-1.79769313486232e+308' # Looks like you failed 24 tests of 36. t/20infinite...dubious Test returned status 24 (wstat 6144, 0x1800) DIED. FAILED tests 6, 8-9, 11, 15-34 Failed 24/36 tests, 33.33% okay Faile
RE: installing DateTime-TimeZone-0.17 on HPUX 10.20... or Cygwin
Hi Jean & Ben, > > From Ben Bennet (Fri, 30 May 2003 15:24:13 -0400) > >OK, it looks like it is bombing because of all of the modules to > >install... each timezone module looks like: > > [snipped] > > > >This is a tough problem to solve... the easiest thing might be to try > >gnu make since that appears to be smart enough to handle arbitrarily > >long strings. The fix probably needs to occur in MakeMaker though... > >Might be worth dropping them an email with the example. > > > >-ben > > I have a similar problem with make for cygwin [snipped] > The workaround I used was to type >make -n > make-n.sh > then edit make-n.sh to replace the 32K line >-e "yada yada yada" > by calling a make-n.pl Perl script, which contains one 32K line. > > May be a new item in the FAQ could be sufficient... > > Jean Forget I was not able to get this to work with the HP make utility However, I installed gmake and it works!!! I was able to install the DateTime-TimeZone-0.17. Where do we document these kinda things? Ron Hill
RE: RH9: Cannot determine ...
Hi Rick, > > I'm having problems with RedHat 9. Now it could just be my install, > but someone might be able to help me. I know this is offtopic, but > the problem only reared it's head when installing DateTime. The > problem is this: in shell, I can't type a quote without a seqeunce > such as [quote][x][delete]. It seems that if I type [quote][e] I get > an 'e' with an accute. [quote] seems to have become a meta key for > accents and thus I get only the occasional quote in my Makefile. See > below. > > Does anyone have any idea what's going on? I just tested it in gEdit > under X and I have exactly the same problem [snipped] I seem to recall something like this in CLPM. I can't find it now, But is had to do the the locale setting The workaround for your original problem is probably to execute the Makefile.PL and the make/make test phase with the locale set to LC_ALL=C. Ron Hill
RE: Windows once more
> > Ok, I think the test results for 20infinite.t may be > different because of > recent changes in subtract_datetime. Could a Windows user > run the tests > again, please? > > For the 04epoch.t failures, I think I'll need to be able to > use the latest > Time::Local code, which means releasing it to CPAN. > Hopefully this will > happen soon. I was not able to find the Time::Local module on CPAN Here are the results of nmake test G:\modules\DateTime.pm>nmake test Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. F:\perl\bin\Perl.exe -Mblib -IF:\Perl\lib -IF:\Perl\lib -e "use Test::Harness qw(&runtests verbose); $verbose=0; runtests @ARGV;" t\00load.t t\01sanity.t t\02last_day.t t\03components.t t\04 poch.t t\05set.t t\05tz.t t\06add.t t\07compare.t t\09greg.t t\10subtract.t t\11duration.t t\12week t t\13strftime.t t\14language.t t\15jd.t t\16truncate.t t\17set_return.t t\18today.t t\19leap_secon .t t\20infinite.t t\21bad_params.t t\22_from_doy.t t\zz_00load.t t\zz_01sanity.t t\zz_02last_day.t \zz_03components.t t\zz_04epoch.t t\zz_05set.t t\zz_05tz.t t\zz_06add.t t\zz_07compare.t t\zz_09gre .t t\zz_10subtract.t t\zz_11duration.t t\zz_12week.t t\zz_13strftime.t t\zz_14language.t t\zz_15jd. t\zz_16truncate.t t\zz_17set_return.t t\zz_18today.t t\zz_19leap_second.t t\zz_20infinite.t t\zz_2 bad_params.t t\zz_22_from_doy.t Using G:/modules/DateTime.pm/blib t\00load..ok t\01sanityok t\02last_day..ok t\03componentsok t\04epoch.NOK 25# Failed test (t\04epoch.t at line 96) # got: undef # expected: '-2082844800' The 'day' parameter to DateTime::new was an 'undef', which is not one of the allowed types: scalar at t\04epoch.t line 101 # Looks like you planned 28 tests but only ran 25. # Looks like your test died just after 25. t\04epoch.dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 25-28 Failed 4/28 tests, 85.71% okay t\05set...ok t\05tzok t\06add...ok t\07compare...ok t\09greg..ok 34/35# this may take a minute... t\09greg..ok t\10subtract..ok t\11duration..ok t\12week..ok t\13strftime..ok t\14language..ok t\15jdok t\16truncate..ok t\17set_returnok t\18today.ok t\19leap_second...ok t\20infinite..NOK 12# Failed test (t\20infinite.t at line 55) # got: '1.#QNAN' # expected: '-1.#IND' t\20infinite..NOK 13# Failed test (t\20infinite.t at line 55) # got: '1.#QNAN' # expected: '-1.#IND' t\20infinite..NOK 14# Failed test (t\20infinite.t at line 55) # got: '0' # expected: '-1.#IND' t\20infinite..ok 36/36# Looks like you failed 3 tests of 36. t\20infinite..dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 12-14 Failed 3/36 tests, 91.67% okay t\21bad_paramsok t\22_from_doy.ok t\zz_00load...ok t\zz_01sanity.ok t\zz_02last_day...ok t\zz_03components.ok t\zz_04epoch..NOK 25# Failed test (t\zz_04epoch.t at line 100) # got: undef # expected: '-2082844800' The 'day' parameter to DateTime::new was an 'undef', which is not one of the allowed types: scalar at t\zz_04epoch.t line 105 # Looks like you planned 28 tests but only ran 25. # Looks like your test died just after 25. t\zz_04epoch..dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 25-28 Failed 4/28 tests, 85.71% okay t\zz_05setok t\zz_05tz.ok t\zz_06addok t\zz_07compareok t\zz_09greg...ok 34/35# this may take a minute... t\zz_09greg...ok t\zz_10subtract...ok t\zz_11duration...ok t\zz_12week...ok t\zz_13strftime...ok t\zz_14language...ok t\zz_15jd.ok t\zz_16truncate...ok t\zz_17set_return.ok t\zz_18today..ok t\zz_19leap_secondok t\zz_20infinite...NOK 12# Failed test (t\zz_20infinite.t at line 59) # got: '1.#QNAN' # expected: '-1.#IND' t\zz_20infinite...NOK 13# Failed test (t\zz_20infinite.t at line 59) # got: '1.#QNAN' # expected: '-1.#IND' t\zz_20infinite...NOK 14# Failed test (t\zz_20infinite.t at line 59) # got: '0' # expected: '-1.#IND' t\zz_20infinite...ok 36/36# Looks like you failed 3 tests of 36. t\zz_20infinite...dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 12-14 Failed 3/36 tests, 91.67% okay t\zz_21bad_params.ok t\zz_22_from_doy..ok Failed Test Stat Wstat Total Fail Failed List of Failed --- t\04epoch.t255 65280284 14.29% 25
RE: installing DateTime-TimeZone-0.17 on HPUX 10.20 perl 5.8.0 us ing HP's ANSI C Compiler?
> > On Fri, 30 May 2003, Hill, Ronald wrote: > > > Hi All, > > > > Has anyone installed DateTime-TimeZone-0.17 on HPUX? > > make is reporting line to long. > > > > $ /app/perl5.8.0/bin/perl Makefile.PL > > Writing Makefile for DateTime::TimeZone > > $ make > > Make: line too long. Stop. > > This might be fixed by upgrading ExtUtils::MakeMaker to a > newer version. > > I have upgraded MakeMaker to the current version still fails with line to long :( Ron
RE: Bug in DateTime::Span->contains()
Hi Dave, > > On Fri, 30 May 2003, Hill, Ronald wrote: > > > t\04epoch.NOK 25# Failed test (t\04epoch.t > at line 96) > > # got: undef > > # expected: '-2082844800' > > The 'day' parameter to DateTime::new was an 'undef', which > is not one of the > > allowed types: sca > > at t\04epoch.t line 101 > > # Looks like you planned 28 tests but only ran 25. > > # Looks like your test died just after 25. > > t\04epoch.dubious > > Test returned status 255 (wstat 65280, 0xff00) > > DIED. FAILED tests 25-28 > > Failed 4/28 tests, 85.71% okay > > What version of Perl do you have installed? I bet this is > because you're > using an earlier version of Time::Local, because I have problems with > these tests using Perl 5.00503 on my Linux box. I did this test using activestate 5.6.1 So I switched to 5.8.0 and reran the tests. results: t\zz_03components.ok t\zz_04epoch..ok 25/28The 'hour' parameter to DateTime::new was an 'und of the allowed types: scalar at t\zz_04epoch.t line 105 # Looks like you planned 28 tests but only ran 25. # Looks like your test died just after 25. t\zz_04epoch..dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 26-28 Failed 3/28 tests, 89.29% okay Now it does not like the hour parameter!! [snipped] > > This is just weird. Why does Windows think that > > infinity - infinity = 0 > > for the third subtraction, but not the first two? I'm so confused. > For these tests the results were the same!! I am confused as well :( I wish I could help out more!! Ron Hill