Skip to content

Commit

Permalink
Merge pull request #287 from mknos/date-tidy
Browse files Browse the repository at this point in the history
date: unused var
  • Loading branch information
briandfoy authored Oct 10, 2023
2 parents f873ba0 + 58fe711 commit 517794c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions bin/date
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ sub munge_tz {
my $from_posix = posix_tz();
return $from_posix if $from_posix =~ m/\A[A-Z]{3,4}\z/;
my $from_windows = windows_time_zones();
# print "# from POSIX: $from_posix\n";
my $i_dst = (core_time())[-1] ? -1 : 0; # some only have one entry, so two would be the same

return $from_windows->{$from_posix}[$i_dst] if exists $from_windows->{$from_posix};
Expand All @@ -57,8 +56,7 @@ sub quarter {
}

sub run {
my( $args, $time ) = @_;
$time = defined $time ? $time : time;
my $args = shift;
*core_time = do {
my @times = CORE::localtime;
sub { @times }
Expand All @@ -80,9 +78,7 @@ sub run {
if( /^\-u/ ) { $TZ = $ENV{'TZ'} = 'UTC'; my @times = CORE::gmtime; *core_time = sub { @times } }
}

my $format;
$format = select_format( @$args );

my $format = select_format(@$args);
my $specifiers = setup_specifiers();

$format =~ s/%(:?.)/ exists $specifiers->{$1} ? $specifiers->{$1} : "%$1" /eg;
Expand Down

0 comments on commit 517794c

Please sign in to comment.