Skip to content

Commit

Permalink
fix: remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
joy2362 committed Jun 29, 2024
1 parent ad6afc3 commit 24e04ac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/TimeZoneService.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ private function getLabel($timezone): string

$defaultTimeZone = Config::get('Timezone.DEFAULT_TIME_ZONE', 'GMT');

$defaultTimeZone = Config::get('Timezone.DEFAULT_TIME_ZONE', 'GMT');
$defaultTimeZone = in_array($defaultTimeZone, $this->supportedTimeZone) ? $defaultTimeZone : $this->supportedTimeZone[0];
return "({$defaultTimeZone} {$time_diff}) {$zone}";
} catch (Exception $ex) {
Expand Down Expand Up @@ -186,4 +185,4 @@ private function getTimeZoneList(array $timezones, string $type = 'list'): array
}
return $data;
}
}
}

0 comments on commit 24e04ac

Please sign in to comment.