--- lib/Date/Format.pm +++ lib/Date/Format.pm @@ -85,7 +85,7 @@ $tzname = sprintf("%+05d",$tzname) unless($tzname =~ /\D/); - $epoch = timegm(@{$time}[0..5]); + $epoch = timegm( @$time[0], @$time[1], @$time[2], @$time[3], @$time[4], @$time[5] ); @$me = gmtime($epoch + tz_offset($tzname) - tz_offset()); } @@ -217,7 +217,7 @@ sub format_M { sprintf("%02d",$_[0]->[1]) } sub format_q { sprintf("%01d",int($_[0]->[4] / 3) + 1) } sub format_s { - $epoch = timegm(@{$_[0]}[0..5]) + $epoch = timegm($_[0], $_[1], $_[2], $_[3], $_[4], $_[5] ) unless defined $epoch; sprintf("%d",$epoch) }