Skip Menu |

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

Report information
The Basics
Id: 67064
Status: resolved
Priority: 0/
Queue: DateTime-Incomplete

People
Owner: FGLOCK [...] cpan.org
Requestors: ether [...] cpan.org
Cc:
AdminCc:

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



Subject: ->next is not taking timezones into account
It would appear that next() calculations are not taking time zones into account. Here is a simple test: use strict; use warnings; use DateTime; use DateTime::Incomplete; use Test::More; # 2011-03-29 00:00:00 my $dt = DateTime->new(year => 2011, month => 03, day => 29, time_zone => 'UTC'); # Sao Paolo is UTC-03 my $dti = DateTime::Incomplete->new(hour => 7); # when is it next 7am in Brazil? ... should be 4am UTC. my $next = $dti->next($dt); #use Data::Dumper; #print "### next: ", Dumper($next); is(ref($next->time_zone), 'DateTime::TimeZone::UTC', '$dt timezone is UTC'); is($next->hour, 4, '7am in Brazil is 4am UTC'); done_testing; Have I misunderstood the documentation? It should be possible to pass a $dt into next() with a different timezone than the $dti object.
Fixed in 0.06