Re: Leap seconds / time zone bug in DateTime.pm

2004-09-01 Thread Dave Rolsky
On Fri, 6 Aug 2004, Eugene van der Pijll wrote: > I've attached a patch for the test files. I haven't looked into the > DateTime.pm code, because both leap second and the time zone handling > code are just too scary! I checked this patch in. I'll try to fix this soon. -dave /*

Re: Formatters and DateTime subclasses

2004-09-01 Thread Dave Rolsky
On Thu, 15 Jul 2004, Michael G Schwern wrote: > Let's say I've got a simple DateTime subclass with some local extras > attached: > > package My::DateTime; > use base 'DateTime'; > > sub first_of_the_month { > my $self = shift; > $self->set(day => 1); > } > > How do I ge

Re: Formatters and DateTime subclasses

2004-09-02 Thread Dave Rolsky
On Thu, 2 Sep 2004, Rick Measham wrote: > On 2 Sep 2004, at 2:51 PM, Rick Measham wrote: > > It'd be really ugly to do stuff like: > > $dt = $strptime->parse_datetime( $string, asa => 'My::DateTime' ); > > But we could do something similar with just a change in DateTime > itself. We have a 'from

Re: [PATCH] Re: new fan has questions/comments/suggestions

2004-09-02 Thread Dave Rolsky
On Thu, 2 Sep 2004, Daisuke Maki wrote: > +sub parse_datetime > +{ > +my $self = shift; > +if (!$self->{formatter} || ! UNIVERSAL::can($self->{formatter}, > 'parse_datetime')) { > +die "No formatter available (or specified formatter can't perform > 'parse_datetime()')"; > +}

Re: French translation of DateTime:xxx pods: available

2004-09-02 Thread Dave Rolsky
On Thu, 2 Sep 2004, Jean Forget wrote: > I have translated a few DateTime pods into French and they > are available on : > http://datetime.mongueurs.net/ Your broke my Pinyin! You changed "ni3 na4 bian1 ji3 dian2?" to "ni neibian jidian". Have some respect, that film is partially set in Paris

Re: [PATCH] Re: new fan has questions/comments/suggestions

2004-09-02 Thread Dave Rolsky
On Thu, 2 Sep 2004, Daisuke Maki wrote: > No evilness involved there. Just thought that if you have a formatter > that can format and parse, you might as well do both. I can surely live > without having that method. > > Is the rest ok? Yep, looks good. Feel free to check it in. -dave /*==

Re: Formatters and DateTime subclasses

2004-09-04 Thread Dave Rolsky
On Fri, 3 Sep 2004, Joshua Hoblitt wrote: > On Thu, 2 Sep 2004, Dave Rolsky wrote: > > > Well, the original question was in regards to subclasses of DateTime.pm. > > Given that a subclass will inherit from_object(), that seems good enough. > > > > my $my_dt =

Re: Problem installing datetime

2004-09-04 Thread Dave Rolsky
On Sat, 4 Sep 2004, Rick Measham wrote: > Dave, is there something inherent in the DateTime distro that causes > this. I've not seen this problem with other modules on RH9. Is it > something we can fix from our end? I have no idea. I have seen bug reports for other modules that look similar. Ho

Re: Formatters and DateTime subclasses

2004-09-07 Thread Dave Rolsky
On Tue, 7 Sep 2004, Joshua Hoblitt wrote: > On Sat, 4 Sep 2004, Dave Rolsky wrote: > > > On Fri, 3 Sep 2004, Joshua Hoblitt wrote: > > > > > Except for all those non-inheritable lexical variables in the DateTime > > > namespace... > > > > Like wh

Re: DateTime::Format::Strptime speed compared to Time::Piece

2004-09-09 Thread Dave Rolsky
On Thu, 9 Sep 2004, Joshua Hoblitt wrote: > You can more then double your performance with DateTime::Format::Strptime by > instantiating a parser object and reusing it. You should also keep in mind > that Time::Piece doesn't really support leapseconds (it may be able to parse > them on some platf

Re: DateTime::Format::Strptime speed compared to Time::Piece

2004-09-10 Thread Dave Rolsky
On Sat, 11 Sep 2004, Rick Measham wrote: > I'll take a look at the Time::Piece code and the XS Howto docs. I've > never written an XS module but its about time I did. Post a message here if you want some help. I've done more XS than I want to, and helping you steal the Time::Piece XS should be r

Re: support for precision?

2004-09-16 Thread Dave Rolsky
On Thu, 16 Sep 2004, Mark D. Anderson wrote: > Looking at the source code to ISO8601, it appears it has hardcoded > 'DateTime' for the constructor class everywhere. > > Ideally I would think this would be something to do at the Builder > level, so that more than just ISO8601 would benefit. This i

Re: DateTime::Pregnancy name

2004-10-10 Thread Dave Rolsky
On Sun, 10 Oct 2004, Jonas B.Nielsen wrote: > Of course. I just looked over part of the DateTime modules and it > seems I screwed up seriously by using the DateTime ::Pregnancy name. No big deal. I wouldn't call it _serious_. > Maybe it should just have been Date::Pregnancy even though it reli

ANNOUNCE: DateTime::TimeZone 0.30

2004-10-13 Thread Dave Rolsky
0.30 2004-10-13 - This release is based on version 2004d of the Olson database. /*=== VegGuide.Org Your guide to all that's veg. ===*/

Re: DateTime and Windows saga

2004-10-31 Thread Dave Rolsky
On Fri, 29 Oct 2004, Leonardo Herrera wrote: Hi. I've searched the newsgroup but still can't found a solution for the infinity tests failing under Windows. Is there a possibility that these problems were just documented and the tests ignored under Win32? Perl's handling of infinity appears to var

Re: Activestate PPMs for DateTime?

2004-11-01 Thread Dave Rolsky
On Mon, 1 Nov 2004, Joshua Hoblitt wrote: Has anyone that is a win32/activeperl user complained to Activestate that they are not providing a DateTime PPM? I assume that DateTime is still working on win32 but the PPM status page shows that DT 0.22 is failing to build on _all_ platforms. It's cau

Re: [Comment] Re: [cpan #8160] DateTime::Duration reports incorrect weeks

2004-11-01 Thread Dave Rolsky
[ moving this onto the datetime list because I know it's not a bug ... ] On Mon, 1 Nov 2004, [EMAIL PROTECTED] via RT wrote: I think there may be some confusion here. When you just subtract two dates you get a duration that has all possible units it could have. The in_units method can only conver

Re: Activestate PPMs for DateTime?

2004-11-02 Thread Dave Rolsky
On Mon, 1 Nov 2004, Yitzchak Scott-Thoennes wrote: Not that I'm blaming DateTime; there's plenty of blame to go around. ActiveState is to blame for (as rumor has it) having someone maybe sometime completely rewrite their build scripts, instead of just quickly addressing this deficiency. DateTime i

[OT] Re: Activestate PPMs for DateTime?

2004-11-02 Thread Dave Rolsky
On Tue, 2 Nov 2004, John Peacock wrote: Module::Build already has it's own way to tell about dependencies but afaik no one uses it except CPANPLUS. And what is worse is that the Module::Build dependencies are treated as /suggestions/, and will not throw an error if one is not met. I just got a c

Re: missing CVS tags

2004-11-11 Thread Dave Rolsky
On Thu, 11 Nov 2004, Joshua Hoblitt wrote: Were CVS tags intentionally omitted for the 0.22 and 0.23 releases of DateTime.pm? Nope, just carelessness. They could probably be added retroactively. -dave /*=== VegGuide.Org Your guide to all that's veg. =

Re: DateTime FAQ Typo

2004-11-12 Thread Dave Rolsky
On Mon, 4 Oct 2004 [EMAIL PROTECTED] wrote: Hi all, there is a typo in the DateTimeFAQ Instead of my $some_date2 = $some_date->clone()->truncate(to => 'days'); it should be my $some_date2 = $some_date->clone()->truncate(to => 'day'); Thanks, this is fixed now. -dave /*===

failing example code in FAQ (span set)

2004-11-27 Thread Dave Rolsky
There's some example code in the FAQ which fails its tests, but presumably once passed. It's for spansets. Here's the code: use DateTime::Event::Recurrence; use DateTime::SpanSet; # Make the set representing the work start times: M-F 9:00 to 12:00 my $start = DateTime::Event::Recurrence

Re: failing example code in FAQ (span set)

2004-11-27 Thread Dave Rolsky
On Sat, 27 Nov 2004 [EMAIL PROTECTED] wrote: There's some example code in the FAQ which fails its tests, but presumably once passed. It's for spansets. I think the example was meant to be: # Make the set representing the work start times: # Mon-Fri morning 9:00, and afternoon 13:00 my $start

Good press for DateTime

2004-12-01 Thread Dave Rolsky
http://perladvent.org/2004/1st/ -dave /*=== VegGuide.Org Your guide to all that's veg. ===*/

Small mistakes in DateTime advent writeup

2004-12-01 Thread Dave Rolsky
First one: "Unspecified values (here I've not bothered to list nanoseconds) are assumed to be zero." Actually, unspecified values default to one or zero, as appropriate (day & month default to 1). This is pretty minor, though. Later, a more serious mistake is saying that accessors accept value

Re: Good press for DateTime

2004-12-01 Thread Dave Rolsky
On Wed, 1 Dec 2004, John Siracusa wrote: On Wed, 1 Dec 2004 12:21:11, Dave Rolsky <[EMAIL PROTECTED]> wrote: http://perladvent.org/2004/1st/ From the article: # what year are we in? my $year = DateTime->now->year; Another victim of the failure to (attempt to) default to loca

Re: Small mistakes in DateTime advent writeup

2004-12-01 Thread Dave Rolsky
On Wed, 1 Dec 2004, John Siracusa wrote: On Wed, 1 Dec 2004 12:28:35, Dave Rolsky <[EMAIL PROTECTED]> wrote: I strongly dislike combined get/set methods, and they won't appear in DateTime. I recall that discussion from a while back but I don't remember your reasons. Can you briefl

Re: Good press for DateTime

2004-12-01 Thread Dave Rolsky
On Wed, 1 Dec 2004, John Siracusa wrote: On Wed, 1 Dec 2004 13:23:24, Dave Rolsky <[EMAIL PROTECTED]> wrote: If someone gets "local" to work on Win32, it might be considerable. Until then, it's not. Ooo, a glimmer of hope! :) Too bad I don't do any Perl on Win32hrm

Re: Template Toolkit and DateTime::Duration->compare()

2004-12-09 Thread Dave Rolsky
On Wed, 8 Dec 2004, Arshavir Grigorian wrote: I have tracked this down and it appears that somewhere deep in the template processing, TT is doing an 'eq' on a DateTime::Duration object and that's throwing an exception. This seems like it could be a general problem with TT. I wonder why it's usi

Re: Template Toolkit and DateTime::Duration->compare()

2004-12-09 Thread Dave Rolsky
On Thu, 9 Dec 2004, Arshavir Grigorian wrote: - my $atroot = ($root eq $self); + my $atroot = ((ref ($root) eq ref ($self)) && ($root eq $self)); Even better would be something like this: use Scalar::Util qw(refaddr); my $atroot = ref $root && refaddr($root) == refaddr($self); By "overload aware"

ANNOUNCE: DateTime 0.23

2004-12-09 Thread Dave Rolsky
Well, this sure took long enough. I kind of turned some bits of the internals into messy crap in the process of fixing the leap second bugs, but at this point I feel pretty confident in the _tests_ at least. So in the future I do hope to un-crap the internals again. Alternately, I wonder if

ANNOUNCE: DateTime::TimeZone 0.31

2004-12-09 Thread Dave Rolsky
0.31 2004-12-09 - This release is based on version 2004g of the Olson database. /*=== VegGuide.Org Your guide to all that's veg. ===*/

Re: ANNOUNCE: DateTime 0.23

2004-12-10 Thread Dave Rolsky
On Fri, 10 Dec 2004, Eugene van der Pijll wrote: Dave Rolsky schreef: Grr. I think I know what this is, and fixing it shouldn't be too hard. Look for a 0.24 sometime soon. Great! I've found one other problem, which may be related: $dt = DateTime->new(year => 1997, month

Re: DateTime::Duration 'in_units' does not properly normalize units

2004-12-13 Thread Dave Rolsky
On Mon, 13 Dec 2004, Joshua Hoblitt wrote: It looks like the normalization is hosed. This method, for the nth time, does not convert between units which do not have a fixed conversion rate. I'd also point out that it probably won't work well with non-integer units. I'm not sure what'll happen w

Re: ANNOUNCE: DateTime 0.23

2004-12-10 Thread Dave Rolsky
On Fri, 10 Dec 2004, Eugene van der Pijll wrote: Dave Rolsky schreef: Anyway, enjoy ... 0.232004-12-09 (the "oh how I hate leap seconds" release) Dave, I don't really know how to tell you, but... use DateTime; print "DateTime $DateTime::VERSION\n"; $dt = D

ANNOUNCE: DateTime 0.24

2004-12-10 Thread Dave Rolsky
Someday, the pain will stop, and all will be peaceful. But until then ... 0.242004-12-10 (the "have I mentioned I hate leap seconds" release) [ BUG FIXES ] - Fixed even more bugs related to leap seconds and time zones. Reported by Eugene van der Pijll. [ KNOWN BUGS ] - Offsets with a seconds p

Re: ANNOUNCE: DT::TimeZone::TAI

2004-12-10 Thread Dave Rolsky
On Sat, 11 Dec 2004, Eugene van der Pijll wrote: - The name I've chosen ("DT::TZ::TAI") has some problems: DateTime::TimeZone does not recognize it, as it has a one-part name "TAI". If this is to work: $dt = DateTime->now( timezone => "TAI" ); instead of $dt = DateTime->now( tim

Re: DateTime::Duration 'in_units' does not properly normalize units

2004-12-13 Thread Dave Rolsky
On Mon, 13 Dec 2004, Dave Rolsky wrote: How can that be sane? So you ask for minutes and you get fractional minutes but you ask for seconds and get zero? Cause really it should just blow up when you give it fractional anything. Or not. Anyone know of a good way to check that a parameter is one of

Re: DateTime::Duration 'in_units' does not properly normalize units

2004-12-13 Thread Dave Rolsky
On Mon, 13 Dec 2004, Tim Jenness wrote: Thanks for the reply. So are you saying that DateTime::Duration shouldn't really be used at all if I have units of fractional anything and want to convert that to a duration? I'm supposed to convert it first to hours, minutes and seconds and then instantiate

Re: DateTime::Duration 'in_units' does not properly normalize units

2004-12-13 Thread Dave Rolsky
On Mon, 13 Dec 2004, Joshua Hoblitt wrote: On Mon, 13 Dec 2004, Dave Rolsky wrote: On Mon, 13 Dec 2004, Joshua Hoblitt wrote: It looks like the normalization is hosed. This method, for the nth time, does not convert between units which do not have a fixed conversion rate. Whooo, I seem to have

Proposal for a new, more rational calendar

2004-12-21 Thread Dave Rolsky
http://henry.pha.jhu.edu/calendar.html This might be of interest. Doesn't look all that great to me. It has "leap weeks", but there's no way to calculate when they occur, so you have to have a hardcoded list of years which have it. Lame. OTOH, it does get rid of DST, which is good. The site i

Re: How many days between 2 DTs?

2004-12-30 Thread Dave Rolsky
On Wed, 29 Dec 2004, Max Campos wrote: Well, here we go again with DateTime::Duration. Here's a simple problem - How many days are between two DateTime's ? Here is my attempt, but it fails. Suggestions? You want the delta_days() method. -dave /*=== VegGuide.Org Your guide

Re: How many days between 2 DTs?

2004-12-30 Thread Dave Rolsky
On Thu, 30 Dec 2004, Max Campos wrote: After feedback from another poster, it looks like the answer is the following: $now->delta_days($dt)->in_units('days'); It looks like durations end up broken up into 4 partitions. Conversions can happen only within the partitions, not between: years/mont

Re: How many days between 2 DTs?

2004-12-31 Thread Dave Rolsky
On Fri, 31 Dec 2004, Max Campos wrote: I think this your average newcomer will find this very confusing! That may be true but ... I think that a method like this should do what you expect it to do, and if it can't do that, then return an error.This is one of those cases where instead of retu

ANNOUNCE: DateTime::TimeZone 0.32

2005-01-05 Thread Dave Rolsky
0.32 2004-01-05 - Fix for bug revealed by DateTime 0.23, which could cause an "undefined value in eq" warning when creating objects for dates in the far future that were during DST. - This release is based on version 2005a of the Olson database. -dave /*=== VegGuide.Org

Re: [Perl-date-time-dev] Lots a changes.

2005-01-07 Thread Dave Rolsky
On Fri, 7 Jan 2005, Daisuke Maki wrote: +sub _get_cache +{ +if (! defined $CACHE) { +require Cache::FileCache; + +my $namespace = __PACKAGE__; +$namespace =~ s/::/-/g; +$CACHE = Cache::FileCache->new( { +namespace => $namespace, +default_e

Re: Bug: DT::Event::Recurrence Modifies Params

2005-01-07 Thread Dave Rolsky
On Fri, 7 Jan 2005, Daisuke Maki wrote: I suspect these lines.. Index: lib/DateTime/Event/Recurrence.pm === RCS file: /cvsroot/perl-date-time/modules/DateTime-Event-Recurrence/lib/DateTime/Event/Recurrence.pm,v retrieving revision 1.8

Need help from Windows folks for Time::Local

2005-01-07 Thread Dave Rolsky
Could people with Windows run the following bit of Perl: perl -le '@t = gmtime(-1); print grep {defined} @t ? "[EMAIL PROTECTED]" : "undef\n"' And tell me what it prints. Someone reported a bug in Time::Local on WinXP saying that it produced lots of warnings given a value before the start of t

ANNOUNCE: DateTime 0.25

2005-01-10 Thread Dave Rolsky
0.252005-01-10 (the "new year, new bugs" release) [ BUG FIXES ] - Calling set_time_zone() for a datetime very close to a time zone change died for many of the Olson time zones. - The docs for the from_object constructor said that by default, new objects were in the UTC time zone, but in reality

Win32 testers for Time::Local?

2005-01-10 Thread Dave Rolsky
If some Win32 folks could grab the latest CVS version of Time::Local and run the tests that'd be very helpful. -dave /*=== VegGuide.Org Your guide to all that's veg. ===*/

looking for maintainers for some of my modules

2005-01-15 Thread Dave Rolsky
After Iain Truskett died, I took over ownership of his DateTime-related modules on CPAN. However, I don't really use them all that much, so if there's someone out there who would be excited about developing them actively, I'd be happy to pass them along, or co-maintain them. The modules in que

Re: Is it ok to use "zero-but-true"?

2005-01-20 Thread Dave Rolsky
On Thu, 20 Jan 2005 [EMAIL PROTECTED] wrote: DT::Set count() currently returns "undef" on error, and "0" for empty sets. Should it return "zero-but-true" (0e0) for empty sets? No, this is just confusing. What do you mean by "on error"? Do you mean when a set is possibly infinite, and therefore u

Re: [Fwd: timelocal error messages]

2005-01-24 Thread Dave Rolsky
On Mon, 24 Jan 2005, the.noonings wrote: I forgot to include the error messages from the test. They are pasted below. Note that $VERSION= '1.07'; works just fine, but $VERSION= '1.10'; does NOT work, and gives these error messages: Actually, it does work, those are warnings, not error me

RE: DateTime Subtraction

2005-01-25 Thread Dave Rolsky
On Tue, 25 Jan 2005, Hill, Ronald wrote: However, after checking the docs for this function. I found this: The C and C methods truncate the duration so that any fractional portion of a day is ignored. The C method converts any day and month differences to minutes. Unlike the subtraction methods, B

Re: DateTime Subtraction

2005-01-27 Thread Dave Rolsky
On Wed, 26 Jan 2005, Leonardo Herrera wrote: Todd Goldenbaum wrote: I see now, that did the trick. My mistake was assuming that $duration->days would give the same result as $duration->delta_days( $start_date ) or $duration->in_units('days'). I'm curious now though, what >is< $duration->days us

ANNOUNCE: DateTime 0.26

2005-01-27 Thread Dave Rolsky
0.262005-01-27 [ BUG FIXES ] - The docs claimed that the delta_ms(), delta_md(), delta_days() methods always returned a positive duration, but this was not true for delta_md() or delta_days(). -dave /*=== VegGuide.Orgwww.B

ANNOUNCE: DateTime 0.27

2005-01-31 Thread Dave Rolsky
0.272005-01-31 [ ENHANCEMENTS ] - Added local_rd_values() method for the benefit of other modules like DateTime::Event::Recurrence. -dave /*=== VegGuide.Orgwww.BookIRead.com Your guide to all that's veg. My book blog

Re: RFC: DateTime::Util module for week-of-year and week-of-month

2005-01-31 Thread Dave Rolsky
On Mon, 31 Jan 2005 [EMAIL PROTECTED] wrote: Besides the common units, it can calculate 'year_weekly' and 'month_weekly' (week of year, week of month). DT already supports both of these, doesn't it? Check out the week(), week_year(), week_number(), and week_of_month() methods. The subroutine

ANNOUNCE: Time::Local 1.11

2005-02-09 Thread Dave Rolsky
1.112005-02-09 - Try to make detection of supported epoch range a little smarter. The detection was allowing negative epochs on Win32 but apparently this doesn't work, and trying to pass a pre-epoch date in just causes a lot of warnings. This silences warnings during the tests on windows. /*=

Re: PERL Datetime Packaged as ppd

2005-02-17 Thread Dave Rolsky
On Thu, 17 Feb 2005, Eva Soltesz wrote: Could you please compile the latest version of the DateTime perl library into ppd for a very desperate windows user of ActivePerl? The package should include the fixes which Dave Rolsky has done on 24 January 2005 to get rid of some very annoying time

Re: PERL Datetime Packaged as ppd

2005-02-17 Thread Dave Rolsky
On Thu, 17 Feb 2005, Ofer Nave wrote: Dave Rolsky wrote: On Thu, 17 Feb 2005, Eva Soltesz wrote: Could you please compile the latest version of the DateTime perl library into ppd for a very desperate windows user of ActivePerl? The package should include the fixes which Dave Rolsky has done on

ANNOUNCE: DateTime::TimeZone 0.33

2005-02-26 Thread Dave Rolsky
0.33 2005-02-26 - This release is based on version 2005e of the Olson database. - When trying to determine the local time zone, if /etc/localtime is a file, make sure that matching file in /usr/share/zoneinfo is not a symlink. /*=== VegGuide.Org

ANNOUNCE: DateTime::Locale 0.20

2005-02-26 Thread Dave Rolsky
0.20 2005-02-26 * BACKWARDS INCOMPATIBILITY - The way DateTime::Locale::Base subclasses work has changed. Subclasses should no longer implement the date_formats() or time_formats() methods. Instead, they need to provide one method per format length (full_date_format(), long_date_format(), etc).

Re: ANNOUNCE: DateTime::Locale 0.20

2005-02-26 Thread Dave Rolsky
On Sat, 26 Feb 2005, Dave Rolsky wrote: - Uses much newer (August, 2004) data from ICU. This includes a number of new locales. See DateTime::LocaleCatalog for a list. This new data also adds a new type of differentiator for locales, the script (Latin vs Cyrillic, for example). I just noticed

ANNOUNCE: DateTime 0.28

2005-02-27 Thread Dave Rolsky
0.282005-02-27 [ ENHANCEMENTS ] - The era names for the era() method are now retrieved from the DateTime.pm object's associated locale. The old era() method, which was hard-coded to use BCE and CE, is renamed secular_era(). The christian_era() method remains the same. [ BUG FIXES ] - Fixed an

Re: DateTime objects are necessarily huge?

2005-02-28 Thread Dave Rolsky
On Mon, 28 Feb 2005, Geoffrey Young wrote: now, because we have a ton of different things that need to be individually wrapped in objects, this means a megaton of data will be floating around our model objects, and even more floating around in our object caches. so, the question I have is whether a

Re: DateTime objects are necessarily huge?

2005-02-28 Thread Dave Rolsky
On Mon, 28 Feb 2005, Geoffrey Young wrote: The hugeness is the DateTime::TimeZone object, not DateTime itself. Those are all singletons, so you only pay the price once per time zone. ok, but how does that affect storable-style serializations? I noticed that you have some storable hooks, but I didn

Re: ANNOUNCE: DateTime 0.28

2005-02-28 Thread Dave Rolsky
On Mon, 28 Feb 2005, Yitzchak Scott-Thoennes wrote: On Sun, Feb 27, 2005 at 11:58:22PM -0600, Dave Rolsky wrote: 0.282005-02-27 [ ENHANCEMENTS ] - The era names for the era() method are now retrieved from the DateTime.pm object's associated locale. The old era() method, which was hard-

Re: DateTime objects are necessarily huge?

2005-02-28 Thread Dave Rolsky
On Mon, 28 Feb 2005, John Siracusa wrote: Can't you just nuke the giant DT:TZ ref before freezing and have it auto-re-vivify when first used after it's thawed? IOW, save the TZ string ("floating", "local", "America/Chicago") and then re-grab a ref to the DT::TZ singleton as needed. That way, you

Re: DateTime objects are necessarily huge?

2005-02-28 Thread Dave Rolsky
On Mon, 28 Feb 2005, Geoffrey Young wrote: It should do that, but there seems to be something wrong: with recent versions (the ones that existed before this weekend's release) I get very similar sizes using nstore: -rw-rw-r--1 geoffgeoff 180 Feb 28 14:02 stored-nonutc -rw-rw-r--

Re: DateTime objects are necessarily huge?

2005-02-28 Thread Dave Rolsky
On Mon, 28 Feb 2005 [EMAIL PROTECTED] wrote: On Mon, 28 Feb 2005, John Siracusa wrote: Can't you just nuke the giant DT:TZ ref before freezing and have it auto-re-vivify when first used after it's thawed? IOW, save the TZ string ("floating", "local", "America/Chicago") and then re-grab a ref to the

Re: DateTime objects are necessarily huge?

2005-02-28 Thread Dave Rolsky
On Mon, 28 Feb 2005 [EMAIL PROTECTED] wrote: Note that this was added in DT::TZ 0.26. DT.pm itself didn't have to be changed, IIRC. I'm sorry - I just installed a new DT::TZ from CPAN and I'm still getting stringified references instead of names. That's cause STORABLE_freeze returns some data and

ANNOUNCE: DateTime::Locale 0.21

2005-02-28 Thread Dave Rolsky
0.21 2005-02-28 - Fix era() method for year 0. This fixes a test failure in DateTime 0.28. -dave /*=== VegGuide.Orgwww.BookIRead.com Your guide to all that's veg. My book blog ==

Re: Olson database name ambiguity

2005-03-07 Thread Dave Rolsky
On Mon, 7 Mar 2005, Tom Yandell wrote: Apologies for cross posting this. I think that this is a problem in the data in the Olson database, but as it is a binary format it is difficult to verify this. I have come across this problem using the DateTime perl module (version 0.28) whose data is generat

Re: Is anyone using dateTime::Timezone in a Production Env ironment?

2005-03-07 Thread Dave Rolsky
On Mon, 7 Mar 2005, Rick Brewer wrote: Just looking for input here, is anyone using DateTime::TimeZone in a production environment right now? We have a need to convert to-and-from a variety of time zones from Perl in a Windows environment and need to account for Daylight Savings Time. DateTime::

Re: List Of Timezones With Offsets

2005-03-09 Thread Dave Rolsky
On Wed, 9 Mar 2005, Rick Brewer wrote: I was able to obtain this list myself just by making use of DateTime and DateTime::TimeZone. Code here for anyone interested: +++ #!perl # Generate lists of timezones sorted alphabetically and by offset use DateTime; use DateTime::TimeZone; my $names = DateTim

Re: RFC: DateTime::TimeZone::Current

2005-03-09 Thread Dave Rolsky
On Wed, 9 Mar 2005, Rick Measham wrote: Just a thought with timezone stuff .. can we look at a non-default timezone option that behaves like M$ (I know, it's screwy!) I envision something that only knows about the current time zones. There is no history. How about future changes? I assume that'

Re: TimeZone Conversion Error During 2:00 Am Hour on Day We Switch to DST

2005-03-10 Thread Dave Rolsky
On Thu, 10 Mar 2005, Rick Brewer wrote: While testing, I am experiencing an error anytime I try and convert from America/Chicago to some other timezone on April 3rd at anytime during the 2:00 am hour (the hour we "spring forward"). I am running on Windows XP using ActiveState Perl 5.8.6. Code sa

Re: Is anyone using dateTime::Timezone in a Production Env ironment?

2005-03-11 Thread Dave Rolsky
On Tue, 8 Mar 2005, Rick Brewer wrote: Thanks for the input. Ron Hill and I have been working to get some install issues on a Windows platform using ActiveState Perl resolved. The DateTime::TimeZone module delivers JUST the functionality we need. Hard to test if we cannot get it installed, thoug

ANNOUNCE: DateTime::TimeZone 0.34

2005-03-11 Thread Dave Rolsky
0.34 2005-03-11 - Some time zone short names were incorrectly being given as something like "GMT/BST", when it should have been alternating between GMT and BST based on the daylight saving time. Reported by Tom Yandell. - This release is based on version 2005e of the Olson database. /*===

ANNOUNCE: DateTime::TimeZone 0.35

2005-03-15 Thread Dave Rolsky
0.35 2005-03-15 the "I hate this dope" release - This release is based on version 2005e of the Olson database. - STORABLE_thaw() now returns $self in preparation for proposed changes to Storable. Hopefully me being on Vicodin ATM hasn't led to any radical new bugs being introduced ;) -dave /

Re: rata die to gregorian?

2005-03-24 Thread Dave Rolsky
On Thu, 24 Mar 2005 [EMAIL PROTECTED] wrote: I was wondering if DateTime has a method for converting rata die (in particular rd seconds) to a gregorian date? I've done a bit of digging, but I'm not finding one, only methods for going G -> RD. Do you mean rata die days expressed in seconds (X * 864

Re: make test fails for Redhat 7.3 and perl 5.6.1

2005-04-01 Thread Dave Rolsky
On Fri, 1 Apr 2005, Chris P Brown wrote: As requested, I've re-run the 2 tests that failed and attached the output. I cannot reproduce these failures. My first guess would be that somehow the tests are being run with an older version of DateTime.pm, but newer tests. If you have any existing ver

Re: DateTime::Event::Cron and limiting infinite sets

2005-04-06 Thread Dave Rolsky
On Wed, 6 Apr 2005 [EMAIL PROTECTED] wrote: Yes - if the set has up to 200 elements (that's an internal hard limit), DateTime::Format::ICal should do the right thing: Why the internal hard limit? If people want to use up all their memory, that's their problem. A warning in the docs is good, but

Re: DateTime::Event::Cron and limiting infinite sets

2005-04-06 Thread Dave Rolsky
On Wed, 6 Apr 2005 [EMAIL PROTECTED] wrote: Why the internal hard limit? If people want to use up all their memory, that's their problem. A warning in the docs is good, but just giving up at an arbitrary number just makes the software less useful. I think this can be fixed - I'll try and make s

Re: DateTime::Format::MySQL and Mysql 4.1 timestamps

2005-04-17 Thread Dave Rolsky
On Mon, 18 Apr 2005, Mike Bissett wrote: Id really like to upgrade my servers to 4.1 can so I get this fixed in the distribution please, or do I have to maintain my own DateTime::Format::MySQL ?? Thanks Patches without tests may sometimes get ignored by lazy developers like myself ;) I just app

Re: DateTime::Format::MySQL and Mysql 4.1 timestamps

2005-04-19 Thread Dave Rolsky
On Mon, 18 Apr 2005, Mike Bissett wrote: If you _want_ to take over maintenance of the module, you're welcome to do so, BTW. Id be happy to do so if your looking to unload, though my current experience with CPAN is limited to only using it, and with this fix the module does pretty much what i need

Re: DateTime::Duration and days

2005-04-25 Thread Dave Rolsky
On Tue, 26 Apr 2005, Kirrily Robert wrote: I'm trying to use DateTime::Duration to show the difference in days, as an integer, between two dates. For instance, the difference between March 1st and April 2nd should be 32 days. Unfortunately if I use the math stuff in Datetime, I end up with a dura

Re: Time Zone GMT/BST?

2005-04-27 Thread Dave Rolsky
On Wed, 27 Apr 2005, Rick Brewer wrote: I recall seeing someone report this as a bug not long ago. When displaying the "short time zone" for Europe/London, GMT/BST is returned. Has a fix been found and published yet? This bug affected my system this morning. Are you using hte latest version of D

Re: DateTime::Sort::Key

2005-04-27 Thread Dave Rolsky
On Wed, 27 Apr 2005, Salvador Fandino wrote: I would like to ask for permission to use the namespace DateTime::Sort::Key for a variation of my other module Sort::Key that is able to sort objects based on some key of type DateTime. This looks like a handy module, but I'd think the namespace should

Storing recurrences in a SQL DBMS?

2005-04-28 Thread Dave Rolsky
Has anyone done any work on this? Basically, I'd like to be able to store these in a way that makes queries like "all the entries for a given month" reasonably efficient. I've come up with a few thoughts: - Store each occurrence as a separate entry, and then store the recurrence in a separate ta

Re: Storing recurrences in a SQL DBMS?

2005-04-29 Thread Dave Rolsky
On Thu, 28 Apr 2005, David Wheeler wrote: On Apr 28, 2005, at 10:48 PM, Dave Rolsky wrote: What I'd really like to see is some way to query both single events and recurring events within a given timeframe, all in one query that returns a sorted array of occurrences. I haven't tried it

Re: Storing recurrences in a SQL DBMS?

2005-04-29 Thread Dave Rolsky
On Fri, 29 Apr 2005, Dave Rolsky wrote: What I'd really like to see is some way to query both single events and recurring events within a given timeframe, all in one query that returns a sorted array of occurrences. Specifically, I'm interested in offering a meetup.com-alike servic

Re: Storing recurrences in a SQL DBMS?

2005-04-29 Thread Dave Rolsky
On Fri, 29 Apr 2005, Flavio S. Glock wrote: Dave Rolsky wrote: Has anyone done any work on this? Basically, I'd like to be able to store these in a way that makes queries like "all the entries for a given month" reasonably efficient. [...] What I'd really like to see is so

Re: Storing recurrences in a SQL DBMS?

2005-04-29 Thread Dave Rolsky
On Fri, 29 Apr 2005, kellan wrote: Actually recurrence exceptions are one really good reason why its hard to ever come up with an elegant, purely rule based recurrence representation. For events involving humans its inevitable that sometimes this month's occurrence will get cancelled or re-schedul

Re: Storing recurrences in a SQL DBMS?

2005-05-03 Thread Dave Rolsky
On Tue, 3 May 2005, Flavio S. Glock wrote: How about using a "view" to create a "lazy" sql recurrence. For example: "FREQ=YEARLY;BYMONTH=3,6" --- postgresql --- CREATE TABLE YEARS ( N DATE UNIQUE PRIMARY KEY ); insert into years values ( date('1990-01-01') ); insert into years values ( date('1991-

Re: Storing recurrences in a SQL DBMS?

2005-05-05 Thread Dave Rolsky
On Wed, 4 May 2005, Flavio S. Glock wrote: Flavio S. Glock wrote: I'm working on a module that translates datetime sets into SQL statements. I'd appreciate to have your feedback on it. Here is a preliminary version: http://www.ipct.pucrs.br/flavio/perl/DateTime-Format-SQL-0.00_07.tar.gz This is the

Re: Storing recurrences in a SQL DBMS?

2005-05-05 Thread Dave Rolsky
On Thu, 5 May 2005, Simon Perreault wrote: In fact, your solution is a way to move the set logic from the app to the SQL server. I don't think it's a good idea. You might as well have the SQL server call a procedure using DateTime::Sets directly, it would be the same computation. Nothing is gained,

Re: Storing recurrences in a SQL DBMS?

2005-05-06 Thread Dave Rolsky
On Thu, 5 May 2005, Simon Perreault wrote: ... ok, now that we got the argument "this is data" out of our way, let's focus on why one would want to put a particular kind of data in a DBMS or not. The whole purpose of a DBMS is *quick retrieval*. That's it. Otherwise, you might just as well use flat

[OT] Re: Storing recurrences in a SQL DBMS?

2005-05-06 Thread Dave Rolsky
On Fri, 6 May 2005, Simon Perreault wrote: I don't agree with that. What's wrong with the correctness of data using XML? XML is a way to enforce correctness in data. Sure, a DBMS also enforce correctness in data, but if that's all you need then you'll probably be better off using XML. It provides e

<    5   6   7   8   9   10   11   12   13   >