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: 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: 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
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($_) } (DATA); 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
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.02nmake 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.02C:\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 01:59: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:\scriptsme.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:\scriptsme.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: 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[ pmfiles.dat ],'$(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: 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: 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:\scriptsmy.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
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 Cdelta_md and Cdelta_days methods truncate the duration so that any fractional portion of a day is ignored. The Cdelta_ms method converts any day and month differences to minutes. Unlike the subtraction methods, Bthese methods always return a positive (or zero) duration. ^^^ 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:\scriptsmy.pl it's negative -18 Which is correct but does not match what the docs say. Anyway I hope this helps. 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: 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-Localperl 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-Localnmake 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-Localnmake 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-Localnmake 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 = { ar =
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.04nmake 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.04nmake 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: 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
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: [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
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: 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 :)
[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
[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
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
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
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:\scriptsy.pl Invalid date format: Jan 26 2001 at F: . Can someone provide insite as to what I am doing wrong? 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
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?
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, 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
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: 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.1704perl 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.1704nmake 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.1704nmake 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.1704g: G:\cd modules G:\modulescd datetime-event-sunrise G:\modules\DateTime-Event-Sunriseperl makefile.pl Checking if your kit is complete... Looks good Writing Makefile for DateTime::Event::Sunrise G:\modules\DateTime-Event-Sunrisenmake 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-Sunrisenmake 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\ar ) t\00load.t t\01basic.t t\00load.ok t\01basicok All tests successful. Files=2, Tests=16, 1 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) G:\modules\DateTime-Event-Sunrise G:\modules\DateTime-Event-Sunrisef: F:\perl_modules\DateTime-0.1704cd .. F:\perl_modulescd datetime-0.1705 F:\perl_modules\DateTime-0.1705nmake distclean Microsoft (R
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] 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: 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: 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:\scriptsperldoc 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
[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
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.
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:\scriptsx.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.1601nmake 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
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.pmnmake 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
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, 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.33nmake 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.21perl 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: ANNOUNCE: DateTime::Format::Strptime 1.0301
Hi Rick, [snipped] F:\perl_modules\DateTime-Format-Strptime-1.03nmake 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: 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::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: 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.pmnmake 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...ok
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++
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.12perl -e print ''.scalar gmtime(1).'' Thu Jan 1 00:00:01 1970 D:\working\DateTime-0.12perl -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: 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++
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: 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: 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: 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: 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 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: Fw: Hijri dates
Hi Ben, [snipped] This is actually the reason that I wanted to get a Moonrise package working... -ben I tried, I failed, I surrender!! Ron
RE: Bug in DateTime::Span-contains()
Hi Flavio, It works for me: 2003-05-10T06:13:00 (I had to manually remove the old DT::E:Sunrise installation, don't know why) - Flavio S. Glock [snipped] Great!! At least that tells me the bug in my module is fixed :) Are you using DateTime-Set version 0.07 and DateTime 0.12? (I need to update the pre req's for sunrise) I wish we could get the DateTime.pm to work on windows. Thanks Flavio Ron Hill
RE: Bug in DateTime::Span-contains()
Hi Dave, On Fri, 30 May 2003, Hill, Ronald wrote: Great!! At least that tells me the bug in my module is fixed :) Are you using DateTime-Set version 0.07 and DateTime 0.12? (I need to update the pre req's for sunrise) I wish we could get the DateTime.pm to work on windows. Have you tried the latest CVS version? It's getting closer, I just need some help debugging the problems. Just like before!!! G:\modules\DateTime.pmnmake 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(runte verbose); $verbose=0; runtests @ARGV; t\00load.t t\01sanity.t t\02last_day.t t\03components.t poch.t t\05set.t t\05tz.t t\06add.t t\07compare.t t\09greg.t t\10subtract.t t\11duration.t t\12 t t\13strftime.t t\14language.t t\15jd.t t\16truncate.t t\17set_return.t t\18today.t t\19leap_s .t t\20infinite.t t\21bad_params.t t\zz_00load.t t\zz_01sanity.t t\zz_02last_day.t t\zz_03compo .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_10s ct.t t\zz_11duration.t t\zz_12week.t t\zz_13strftime.t t\zz_14language.t t\zz_15jd.t t\zz_16tru .t t\zz_17set_return.t t\zz_18today.t t\zz_19leap_second.t t\zz_20infinite.t t\zz_21bad_params. 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: 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 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\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: sca 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 Failed Test Stat Wstat Total Fail Failed List of Failed --- t\04epoch.t255 65280284 14.29% 25-28 t\20infinite.t 3 768363 8.33% 12-14 t\zz_04epoch.t 255 65280284 14.29% 25-28 t\zz_20infinite.t3
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
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: Bundle::DateTime
Hi Iain, [snipped] * Rick Measham ([EMAIL PROTECTED]) [03 Apr 2003 09:22]: [...] Ages ago I proposed that we might need to distribute Bundle::DateTime and now I'm thinking it again. Either that or we could think about auto-install (which I think DBI does?) It may also be useful if someone who uses Windows, and knows how to do it, could produce PPMs and a PAR. I may be able to help out here. I currently have 2 version of perl (5.6.1 5.8.0) on my W2K box. along with visual studio 6.0 It has been a while since I have created a PPM but I'm sure I could pick it up again. As for PAR I have never worked with it so I can't say. Just let me know!! Ron Hill
Params::Validate generate warnings on perl version 5.8.0
Hi Dave, I am seeing warnings when building some Datetime perl modules under 5.8.0. They were not there for version 5.6.1. Can I ignor them? Thanks Ron Hill for perl version 5.8.0 F:\perl_modules\Params-Validate-0.57perl makefile.pl Checking if your kit is complete... Looks good Writing Makefile for Params::Validate [snipped] F:\perl_modules\Params-Validate-0.57nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. [more snippage] cl -c-nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT - DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -DNDEBUG -O1-D VERSION=\0.57\ -DXS_VERSION=\0.57\ -IF:\Perl\lib\CORE Validate.c Validate.c Validate.xs(631) : warning C4101: 'he' : unreferenced local variable Validate.xs(706) : warning C4018: '' : signed/unsigned mismatch Validate.xs(821) : warning C4101: 'value' : unreferenced local variable Validate.xs(948) : warning C4101: 'max' : unreferenced local variable Validate.xs(949) : warning C4101: 'limit' : unreferenced local variable [snippage] then I switched to perl version 5.6.1 F:\perl_modules\Params-Validate-0.57nmake distclean [snipped] F:\perl_modules\Params-Validate-0.57perl makefile.pl [more snippage] F:\perl_modules\Params-Validate-0.57nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cp lib/Params/ValidatePP.pm blib\lib\Params\ValidatePP.pm cp lib/Attribute/Params/Validate.pm blib\lib\Attribute\Params\Validate.pm cp lib/Params/ValidateXS.pm blib\lib\Params\ValidateXS.pm cp lib/Params/Validate.pm blib\lib\Params\Validate.pm F:\perl\bin\Perl.exe -IF:\Perl\lib -IF:\Perl\lib F:\Perl\lib\ExtUtils/xsubpp -typemap F:\Pe rl\lib\ExtUtils\typemap Validate.xs Validate.xsc F:\perl\bin\Perl.exe -IF:\Perl\lib -IF:\Perl\l ib -MExtUtils::Command -e mv Validate.xsc Validate.c cl -c -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPL ICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG -DVERSION=\0.57\ -DXS_ VERSION=\0.57\ -IF:\Perl\lib\CORE Validate.c Validate.c Running Mkbootstrap for Params::Validate () F:\perl\bin\Perl.exe -IF:\Perl\lib -IF:\Perl\lib -MExtUtils::Command -e chmod 644 Validate.b s F:\perl\bin\Perl.exe -IF:\Perl\lib -IF:\Perl\lib -MExtUtils::Mksymlists -e Mksymlists( 'NAME' = 'Params::Validate', 'DLBASE' = 'Validate', 'DL_FUNCS' = { }, 'FUNCLIST' = [], 'IMPORTS ' = { }, 'DL_VARS' = []); link -out:blib\arch\auto\Params\Validate\Validate.dll -dll -nologo -nodefaultlib -release - libpath:F:\Perl\lib\CORE -machine:x86 Validate.obj F:\Perl\lib\CORE\perl56.lib oldnames.lib ker nel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut3 2.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvc rt.lib -def:Validate.def Creating library blib\arch\auto\Params\Validate\Validate.lib and object blib\arch\auto\Params\Val idate\Validate.exp F:\perl\bin\Perl.exe -IF:\Perl\lib -IF:\Perl\lib -MExtUtils::Command -e chmod 755 blib\arch\ auto\Params\Validate\Validate.dll F:\perl\bin\Perl.exe -IF:\Perl\lib -IF:\Perl\lib -MExtUtils::Command -e cp Validate.bs blib\ arch\auto\Params\Validate\Validate.bs F:\perl\bin\Perl.exe -IF:\Perl\lib -IF:\Perl\lib -MExtUtils::Command -e chmod 644 blib\arch\ auto\Params\Validate\Validate.bs
RE: Params::Validate generate warnings on perl version 5.8.0
On Thu, 3 Apr 2003, Hill, Ronald wrote: I am seeing warnings when building some Datetime perl modules under 5.8.0. They were not there for version 5.6.1. Can I ignor them? Do the tests pass? Yes, all tests pass :-) I did not think this would be a problem but I thought you would like to know. Ron Hill
RE: working on the as_set portion of the sunrise module
Hill, Ronald wrote: sub daytime_as_spanset { my $self = shift; my $class = ref($self); my $sunrises = $self-sunrise_as_set; my $sunsets = $self-sunset_as_set; return $sunrises-until( $sunsets ); } maybe sunrise_as_spanset? (land of the midnight sun) Mmm. What does sunrise returns when you don't have nights? I suppose it would be 00:00 ? If the sun is above the specified horizon 24 hours. sunrise is set to time when the sun is at south, minus 12 hours while sunset is set to the south time plus 12 hours. The day length would be 24 hours. No Sunrise is sun is below the specified horizon 24 hours The Day length would be 0 hours, sunrise and sunset are both set to the time when the sun is at south. This is from Paul's C program that I converted for this module. It certainly does not have to be this way. But I have to return something :-) Please see discussion on this subject here: http://groups.google.com/groups?q=sunrise+group:comp.lang.perl.modules+autho r:mothra%40nowhereatall.comhl=enlr=ie=UTF-8oe=UTF-8selm=3e551b72%40usen et.ugs.comrnum=4 I am still undecided as to what to do. Anyway, it would return something like: ... [2003-03-28 06:00 until 2003-03-28 19:00), [2003-03-29 06:03 until 2003-03-29 19:03), [2003-03-30 06:06 until 2003-03-30 19:09), ... sub nighttime_as_spanset { my $self = shift; my $class = ref($self); my $sunrises = $self-sunrise_as_set; my $sunsets = $self-sunset_as_set; return $sunsets-until( $sunrises ); } sunset_as_spanset? This one would return the nights: ... [2003-03-28 19:00 until 2003-03-29 06:03), [2003-03-29 19:03 until 2003-03-30 06:06) ... my $easter = $easter_sunday-as_set(from=$dt1, to=$dt2, inclusive=1); # I would expect $easter_sunday-as_spanset to return # the time from sunday 00:00 until 23:59 $easter = $easter_sunday-as_spanset-intersection( $dt_span ); This is what is throwing me for a loop. The easter_sunday method is returning a date (year,month,day) with no time information because it does not matter what time it is. Weather it is noon or 3:00PM it is still easter! The idea is that easter_sunday-as_set would return start-of-event info: ... 2003-04-28 , 2004-04-28 ... (these are not real easter sundays, just an example) (these are actually daytimes with 00:00:00 h/m/s) OK, I see now. So far so good. While easter_sunday-as_spanset would return whole days, as spans: ... [2003-04-28 00:00 until 2003-04-29 00:00), [2004-04-28 00:00 until 2004-04-29 00:00) ... my $set2 = $sunrise-daytime_as_spanset-intersection ( $easter ); This took my some time to understand because of the term intersection. When I see this I think of union, intersection in terms of arrays ie: finding union of arrays intersection (differences) of arrays. However, in context of your module, it means a while loop. This may need some clarification in the documentation/examples. Intersection is what is in _both_ sets, like: A = ( 1, 3, 5, 7 ) B = ( 1, 5, 9, 12 ) A intersection B = ( 1, 5 ) In datetime context, we would get sunrise until sunset, on easter sundays: daytime spans ... [2003-03-28 06:00 until 2003-03-28 19:00), [2003-03-29 06:03 until 2003-03-29 19:03), [2003-03-30 06:06 until 2003-03-30 19:09), ... intersection to easter sunday spans: ... [2003-04-28 00:00 until 2003-04-29 00:00), [2004-04-28 00:00 until 2004-04-29 00:00) ... gives: ... [2003-04-28 06:12 until 2003-04-29 19:12), [2004-04-28 06:12 until 2004-04-29 19:12) ... It could save some programming :) I hope this helps, Sure! Thanks. I'll try to improve the docs in DateTime::Set now. That would be great! I sure hope you can finish the API so I can try it out!! - Flavio S. Glock Thanks Ron Hill
RE: DateTime::Event::Sunrise Beta number 3
Dave Rolsky wrote: $VERSION = qw($Revision: 0.01 $) [1]; That's not CVS, is it? If it is, please don't use it's revision numbers directly (this is discussed in the dev docs I wrote). No, it is not CVS. This is the way it was in the Astro::Sunrise module I can't remember where I got it from. And even if Dave hadn't prohibited that mode of operation, the above code is not backwards compatible to 5.005_03, which emulates qw() using split. This would be correct, though (note the movement of the parens): $VERSION = (qw$Revision: 0.01 $)[1]; Thanks John!! I have changed the module to use this syntax although this is even better (IMNSHO): use version; $VERSION = new version qw$Revision: 0.01 $; see http://search.cpan.org/author/JPEACOCK/version-0.28/ John
DateTime::Event::Sunrise Beta number 2
Hi All, I have just completed the beta 2 for the DtaeTime::Event::Sunrise module. Please test and let me know of any problems. I have changed the constructor to use named parameters. I also changed the names to use full names. Thanks for all of the suggestions! Ron Hill Sunrise.pm Description: Binary data
DateTime::Event::Sunrise Beta number 3
Hi All, I have just completed the third beta for the Sunrise module. I have added a set method (no documentation yet)I used the set API from Rick's easter module (Thanks Rick!!)Here is the perl script I used to test: #!/usr/bin/perl use strict; use warnings; use DateTime; use DateTime::Event::Sunrise; my $dt1 = DateTime-new( year = 2000, month = 6, day= 20, ); my $dt2 = DateTime-new( year = 2000, month = 11, day= 20, ); my $sunrise = DateTime::Event::Sunrise -new( Longitude ='-118' , Latitude = '33', ); my @set = $sunrise-set(from=$dt1, to=$dt2, inclusive=0); foreach my $tmp(@set) { $tmp-set_time_zone( 'America/Los_Angeles' ); print $tmp-datetime .\n; } This will be the last beta for this. Unless there is an API change request. Any problems please let me know. Thanks Ron Hill Sunrise.pm Description: Binary data
RE: DateTime::Event::Easter - Beta 2
Hi Rick, [snipped] The -set method is now -as_list and I've added -as_set which returns a DateTime::Set object (although this isn't tested at ALL! CPAN wouldn't give me DateTime::Set :)) I guess I jumped the gun a bit, I will follow suit and make the changes to the Sunrise module. Does anyone know where I can get the DateTime::Set module? Thanks for all the suggestions, Cheers! Rick --
RE: DateTime::Event::Easter - Beta 2
Hi Rick, Attached is Beta 2. I think I've incorporated all suggestions. If I've missed anything, let me know. [snipped] The -set method is now -as_list and I've added -as_set which returns a DateTime::Set object (although this isn't tested at ALL! CPAN wouldn't give me DateTime::Set :)) looking at your module you need to add the use DateTime::Set to your script Also here: sub as_set { my $self = shift; # Maybe we should validate here otherwise its as_list that will complain return DateTime::Set-new( dates = [ $self-as_list(@_) ] ); } I added this to my module and it did not complain :-) So do I still need to do some validation? Also under the SYNOPSIS section of the pod you still have @set = $palm_sunday-set(from=$dt, to=$dt2, inclusive=1); need to change that to @set = $palm_sunday-as_list(from=$dt, to=$dt2, inclusive=1); The cache has been removed. This means years are sometimes recalculated a second later, but the memory blow-out factor isn't there. Thanks for all the suggestions, Cheers! Rick You have done a great job on this module!! it looks good. Thanks Ron Hill
RE: DateTime::Set::Sunrise?
Hi Rick, While I know that DateTime::Astro::Sunrise has been released, I wonder if it should not have been DateTime::Set::Sunrise? Well, it is up to the group. I released this module as a development release SO, it should not be a problem with changing the name. BTW, before posting this module I did ask the group about the name and release version. As far as I am conserned, I am willing to use what the group wants!! I figure that it is a set of DateTimes, albeit not like our regular sets (every Monday). If not DateTime::Set::Sunrise, then it should be put wherever we'll put such things as: ::Easter ::Passover ::USElectionDay ::LunarEclipse ::SolarEclipse ::etc... Cheers! Rick Thanks Rick, Ron Hill
Announce: DateTime::Astro::Sunrise 0.01_01 released to CPAN
Hi All, I have just released the DateTime::Astro::Sunrise to CPAN. From the README: This module will return a DateTime Object for sunrise and sunset for a given day. To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: DateTime.pm version 0.07 COPYRIGHT AND LICENCE Same as perl Copyright (C) 2003 Ron Hill This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
proposal for DateTime::Astro::Sunrise
Hi All, I have been working converting my Astro::Sunrise perl module over to use the DateTime API. Does the name DateTime::Astro::Sunrise sound good? I have set the initial version to 0.01_01. Does anyone object to the name or version? Please let me know. Thanks Ron Hill
RE: perl-date-time
[snipped] About moving perl-date-time to CPAN: The modules will be published by their authors or by the project administrators? I suggest making a Bundle too. This is a great Idea!! make them a bundle!! - Flávio S. Glock -- In a parallel DateTime: http://lwn.net/1998/0402/a/datetime.html published in CPAN as: http://search.cpan.org/search?query=datetime+precisemode=all
Announce: Astro::Sunrise 0.8
This is to announce a new version of Astro::Sunrise. This version replaces the dependency on Time::Object to Time::Piece. NAME Astro::Sunrise - Perl extension for computing the sunrise/sunset on a given day SYNOPSIS use Astro::Sunrise; ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST); ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST,ALT); ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST,ALT,inter); $sunrise = sun_rise(longitude,latitude); $sunset = sun_set(longitude,latitude); $sunrise = sun_rise(longitude,latitude,ALT); $sunset = sun_set(longitude,latitude,ALT); $sunrise = sun_rise(longitude,latitude,ALT,day_offset); $sunset = sun_set(longitude,latitude,ALT,day_offset); DESCRIPTION This module will return the sunrise/sunset for a given day. Eastern longitude is entered as a positive number Western longitude is entered as a negative number Northern latitude is entered as a positive number Southern latitude is entered as a negative number inter is set to either 0 or 1. If set to 0 no Iteration will occur. If set to 1 Iteration will occur. Default is 0. There are a number of sun altitides to chose from. The default is -0.833 because this is what most countries use. Feel free to specify it if you need to. Here is the list of values to specify altitude (ALT) with: 0 degrees Center of Sun's disk touches a mathematical horizon -0.25 degrees Sun's upper limb touches a mathematical horizon -0.583 degrees Center of Sun's disk touches the horizon; atmospheric refraction accounted for -0.833 degrees Sun's supper limb touches the horizon; atmospheric refraction accounted for -6 degrees Civil twilight (one can no longer read outside without artificial illumination) -12 degrees Nautical twilight (navigation using a sea horizon no longer possible) -15 degrees Amateur astronomical twilight (the sky is dark enough for most astronomical observations) -18 degrees Astronomical twilight (the sky is completely dark) USAGE sunrise ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST); ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST,ALT); Returns the sunrise and sunset times, in HH:MM format. (Note: Time Zone is the offset from GMT and DST is daylight savings time, 1 means DST is in effect and 0 is not). In the first form, a default altitude of -.0833 is used. In the second form, the altitude is specified as the last argument. Note that adding 1 to the Time Zone during DST and specifying DST as 0 is the same as indicating the Time Zone correctly and specifying DST as 1. Notes on Iteration ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST,ALT,inter); The orginal method only gives an approximate value of the Sun's rise/set times. The error rarely exceeds one or two minutes, but at high latitudes, when the Midnight Sun soon will start or just has ended, the errors may be much larger. If you want higher accuracy, you must then use the iteration feature. This feature is new as of version 0.7. Here is what I have tried to accomplish with this. a) Compute sunrise or sunset as always, with one exception: to convert LHA from degrees to hours, divide by 15.04107 instead of 15.0 (this accounts for the difference between the solar day and the sidereal day. b) Re-do the computation but compute the Sun's RA and Decl, and also GMST0, for the moment of sunrise or sunset last computed. c) Iterate b) until the computed sunrise or sunset no longer changes significantly. Usually 2 iterations are enough, in rare cases 3 or 4 iterations may be needed. *For Example* ($sunrise, $sunset) = sunrise( 2001, 3, 10, 17.384, 98.625, -5, 0 ); ($sunrise, $sunset) = sunrise( 2002, 10, 14, -105.181, 41.324, -7, 1, -18); ($sunrise, $sunset) = sunrise( 2002, 10, 14, -105.181, 41.324, -7, 1, -18, 1); =back sun_rise $sun_rise = sun_rise( longitude, latitude ); $sun_rise = sun_rise( longitude, latitude, ALT ); $sun_rise = sun_rise( longitude, latitude, ALT, day_offset ); Returns the sun rise time for the given location. The first form uses today's date (from
Params-Validate-0.52 installation error on Win32
Hi David, I received an error when installing Params-Validate-0.52 for Win32 systems. Basically, the makefile.PL file needs to be changed (to reconize the c compiler) Here are the changes: if ($^O eq MSWin32) { system(nmake test$Config{obj_ext}) and no_cc(); }else{ system(make test$Config{obj_ext}) and no_cc(); } once this was done all is fine F:\perl_modules\Params-Validate-0.52nmake 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\01-validate.t t\02-noop.t t\03-attribute.t t\04-defaults.t t\05-noop_default.t t\06-options.t t\07-with.t t\08-noop_with.t t\09-regex.t t\10-noop_regex.t Using F:/perl_modules/Params-Validate-0.52/blib t\01-validateok t\02-noopok t\03-attribute...ok t\04-defaultsok t\05-noop_defaultok t\06-options.ok t\07-withok t\08-noop_with...ok t\09-regex...ok t\10-noop_regex..ok All tests successful. Files=10, Tests=276, 1 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU) F:\perl_modules\Params-Validate-0.52nmake install
Announce Astro::Sunrise 0.7
Hi All, This is to announce a new version of Astro::Sunrise. I fixed the issue with the build I added the PREREQ_PM to the Makefile.PL. I also added a new function Iteration. This feature is very alpha!! Thanks Ron Hill NAME Astro::Sunrise - Perl extension for computing the sunrise/sunset on a given day SYNOPSIS use Astro::Sunrise; ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST); ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST,ALT); ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST,ALT,inter); $sunrise = sun_rise(longitude,latitude); $sunset = sun_set(longitude,latitude); $sunrise = sun_rise(longitude,latitude,ALT); $sunset = sun_set(longitude,latitude,ALT); $sunrise = sun_rise(longitude,latitude,ALT,day_offset); $sunset = sun_set(longitude,latitude,ALT,day_offset); DESCRIPTION This module will return the sunrise/sunset for a given day. Eastern longitude is entered as a positive number Western longitude is entered as a negative number Northern latitude is entered as a positive number Southern latitude is entered as a negative number inter is set to either 0 or 1. If set to 0 no Iteration will occur. If set to 1 Iteration will occur. Default is 0. There are a number of sun altitides to chose from. The default is -0.833 because this is what most countries use. Feel free to specify it if you need to. Here is the list of values to specify altitude (ALT) with: 0 degrees Center of Sun's disk touches a mathematical horizon -0.25 degrees Sun's upper limb touches a mathematical horizon -0.583 degrees Center of Sun's disk touches the horizon; atmospheric refraction accounted for -0.833 degrees Sun's supper limb touches the horizon; atmospheric refraction accounted for -6 degrees Civil twilight (one can no longer read outside without artificial illumination) -12 degrees Nautical twilight (navigation using a sea horizon no longer possible) -15 degrees Amateur astronomical twilight (the sky is dark enough for most astronomical observations) -18 degrees Astronomical twilight (the sky is completely dark) USAGE sunrise ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST); ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST,ALT); Returns the sunrise and sunset times, in HH:MM format. (Note: Time Zone is the offset from GMT and DST is daylight savings time, 1 means DST is in effect and 0 is not). In the first form, a default altitude of -.0833 is used. In the second form, the altitude is specified as the last argument. Note that adding 1 to the Time Zone during DST and specifying DST as 0 is the same as indicating the Time Zone correctly and specifying DST as 1. Notes on Iteration ($sunrise, $sunset) = sunrise(,MM,DD,longitude,latitude,Time Zone,DST,ALT,inter); The orginal method only gives an approximate value of the Sun's rise/set times. The error rarely exceeds one or two minutes, but at high latitudes, when the Midnight Sun soon will start or just has ended, the errors may be much larger. If you want higher accuracy, you must then use the iteration feature. This feature is new as of version 0.7. Here is what I have tried to accomplish with this. a) Compute sunrise or sunset as always, with one exception: to convert LHA from degrees to hours, divide by 15.04107 instead of 15.0 (this accounts for the difference between the solar day and the sidereal day. b) Re-do the computation but compute the Sun's RA and Decl, and also GMST0, for the moment of sunrise or sunset last computed. c) Iterate b) until the computed sunrise or sunset no longer changes significantly. Usually 2 iterations are enough, in rare cases 3 or 4 iterations may be needed. *For Example* ($sunrise, $sunset) = sunrise( 2001, 3, 10, 17.384, 98.625, -5, 0 ); ($sunrise, $sunset) = sunrise( 2002, 10, 14, -105.181, 41.324, -7, 1, -18); ($sunrise, $sunset) = sunrise( 2002, 10, 14, -105.181, 41.324, -7, 1, -18, 1); =back sun_rise $sun_rise = sun_rise( longitude, latitude ); $sun_rise = sun_rise( longitude, latitude, ALT ); $sun_rise = sun_rise( longitude, latitude, ALT, day_offset );
Is there an archive of this list ?
Hi All, Is there an archive of this list somewhere? I just joined and would like to catch up! Thanks Ron Hill