Hi Folks,

It looks like Cairo changes its daylight savings at 11pm, causing truncate(to=> day) to fail on Apr 25, 2008. Is this by chance corrected in a newer version of DateTime? I'm using v.30

If not, then I guess this really opens up a can of worms as to what "today" should do on this date.

use DateTime;
$x = DateTime->new(year => 2008, month => 4, day => 25, hour => 12, minute => 12);
$x->set_time_zone('Africa/Cairo');
$x->truncate(to => 'day');
print "$x\n";
-------------
Invalid local time for date in time zone: Africa/Cairo

- Max

Reply via email to