forked from pool/perl-TimeDate
This commit is contained in:
20
TimeDate-deprecated_array_use.patch
Normal file
20
TimeDate-deprecated_array_use.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- 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)
|
||||
}
|
Reference in New Issue
Block a user