Subject: | Mythical bug |
Hi, all!
I got very strange results while executing following code:
[code]
use strict;
use Class::Date;
my $date = new Class::Date [2007, 3, 25, 1, 0, 0];
print "$date\n";
$date += new Class::Date::Rel '1h';
print "$date\n";
$date += new Class::Date::Rel '2h';
print "$date\n";
$date = new Class::Date [2007, 3, 25, 2, 0, 0];
print "$date\n";
$date = new Class::Date [2007, 3, 25, 3, 0, 0];
print "$date\n";
$date -= new Class::Date::Rel '1h';
print "$date\n";
$date -= new Class::Date::Rel '2h';
print "$date\n";
[/code]
expected:
2007-03-25 01:00:00
2007-03-25 02:00:00
2007-03-25 04:00:00
2007-03-25 02:00:00
2007-03-25 03:00:00
2007-03-25 02:00:00
2007-03-25 00:00:00
got:
2007-03-25 01:00:00
2007-03-25 01:00:00
2007-03-25 03:00:00
2007-03-25 03:00:00
2007-03-25 03:00:00
2007-03-25 03:00:00
2007-03-25 01:00:00
Look, that everything is OK when we use some other date (Marth, 24th for
example). I don't know why is it so.