Skip Menu |
 

This queue is for tickets about the DateTime-TimeZone CPAN distribution.

Report information
The Basics
Id: 59405
Status: resolved
Priority: 0/
Queue: DateTime-TimeZone

People
Owner: Nobody in particular
Requestors: bb [...] merrony.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.19
Fixed in: (no value)



Subject: Undocumented _rules attribute
Download (untitled) / with headers
text/plain 543b
(Affects all OS and Perl versions, I don't know which version of the module added the feature). The _rules attribute of an DateTime::TimeZone object returns an array of DateTime::TimeZone::OlsonDB::Rule objects. These encode the start and end of DST observances. my $o = DateTime::TimeZone->new(name => 'Europe/Vienna')->_rules->[1]; say sprintf "%s summertime ends at %s on %s in %s each year", $o->name, $o->at, $o->on, $o->month; I'd like to request that this is publicly documented, so that it can be used reliably. Many thanks.
Subject: Re: [rt.cpan.org #59405] Undocumented _rules attribute
Date: Fri, 16 Jul 2010 11:54:45 -0500 (CDT)
To: "https://www.google.com/accounts/o8/id?id=AItOawn_GbnfuZyBWxgnPDNG05hAeqnDh_agDwA via RT" <bug-DateTime-TimeZone [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
Download (untitled) / with headers
text/plain 1.1k
On Thu, 15 Jul 2010, https://www.google.com/accounts/o8/id?id=AItOawn_GbnfuZyBWxgnPDNG05hAeqnDh_agDwA via RT wrote: Show quoted text
> The _rules attribute of an DateTime::TimeZone object returns an array > of DateTime::TimeZone::OlsonDB::Rule objects. These encode the start > and end of DST observances. > > my $o = DateTime::TimeZone->new(name => 'Europe/Vienna')->_rules->[1]; > say sprintf "%s summertime ends at %s on %s in %s each year", $o->name, > $o->at, $o->on, $o->month; > > I'd like to request that this is publicly documented, so that it can be > used reliably.
In order to make it public, it'd have to be more than an array ref. For one thing, returning the actual array ref used by the zone is quite dangerous, since an accidental change to the array ref would break the zone object! I'd suggest you discuss this on the datetime@perl.org list ,and maybe explain exactly what you're interested in doing with this data. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Download (untitled) / with headers
text/plain 355b
On Fri Jul 16 12:54:55 2010, autarch@urth.org wrote: Show quoted text
> ... > > I'd suggest you discuss this on the datetime@perl.org list ,and maybe > explain exactly what you're interested in doing with this data. > > > -dave
Hi, I've now posted a query around this on the list: http://www.nntp.perl.org/group/perl.datetime/2010/07/msg7534.html Kind regards, Elliot


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.