mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-10 13:21:21 +00:00
Replace deprecated method.
This commit is contained in:
@@ -57,9 +57,14 @@ class NewIPAddressWarningMail extends Mailable
|
||||
public function build(): self
|
||||
{
|
||||
// time
|
||||
$this->time = now()->formatLocalized((string)trans('config.date_time'));
|
||||
|
||||
$this->time = now(config('app.timezone'))->isoFormat((string)trans('config.date_time_js'));
|
||||
$this->host = '';
|
||||
$hostName = gethostbyaddr($this->ipAddress);
|
||||
try {
|
||||
$hostName = gethostbyaddr($this->ipAddress);
|
||||
} catch(\Exception $e) {
|
||||
$hostName = $this->ipAddress;
|
||||
}
|
||||
if ($hostName !== $this->ipAddress) {
|
||||
$this->host = $hostName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user