Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

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

People
Owner: Nobody in particular
Requestors: perl [...] galumph.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.20



CC:
Subject: Stated guarantee that new() always returns the same object for a given name is not true.
Date: Wed, 14 Jul 2010 18:19:45 +0000 (GMT)
To: bug-datetime-timezone [...] rt.cpan.org
From: perl [...] galumph.com
The description for the name() method reads: "Returns the name of the time zone. If this value is passed to the new() method, it is guaranteed to create the same object." This is not the case. So is this a code or documentation bug? Maybe this should say "it is guaranteed to create the same class of object". Interestingly, for me, the output of the following shows the same address for the first and third instances: perl -MDateTime::TimeZone -MScalar::Util=refaddr -E 'say refaddr(DateTime::TimeZone->new(name => "UTC")) for 1..3'
Subject: Re: [rt.cpan.org #59375] Stated guarantee that new() always returns the same object for a given name is not true.
Date: Wed, 14 Jul 2010 22:23:52 -0500 (CDT)
To: Elliot Shank via RT <bug-DateTime-TimeZone [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Wed, 14 Jul 2010, Elliot Shank via RT wrote: Show quoted text
> The description for the name() method reads: "Returns the name of the > time zone. If this value is passed to the new() method, it is guaranteed > to create the same object." This is not the case.
Yeah, it should say it sometimes returns the same object. This only matters for Olson-based zones. For UTC, there's no DST shifts, so the object has no mutable state. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/